More efficient way to avoid multiple If statements in one formula

dbarbella

New Member
Joined
Jun 6, 2017
Messages
32
Hey Gang.
I'm wondering what the most efficient approach would be

On another sheet, I have a value
I want to return the Account Tier Name based on what range that value falls between

So let's say I have a cell that I enter the value $2,500 (Let's call that Cell A1)

I need it to scan the below table:
<style type="text/css"><!--br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<colgroup><col style="width: 169px"><col width="126"><col width="126"><col width="126"></colgroup><tbody>[TR]
[TD="bgcolor: #C9DAF8"]Account Tiers (Column B)[/TD]
[TD="bgcolor: #C9DAF8"]Low (Column C)[/TD]
[TD="bgcolor: #C9DAF8"]High (Column D)[/TD]
[TD="bgcolor: #C9DAF8"][/TD]
[/TR]
[TR]
[TD]Tier 1[/TD]
[TD="align: right"]$10,000[/TD]
[TD="align: right"]$9,999,999,999[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Tier 2[/TD]
[TD="align: right"]$4,000[/TD]
[TD="align: right"]$9,999[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Tier 3[/TD]
[TD="align: right"]$2,000[/TD]
[TD="align: right"]$3,999[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Tier 4[/TD]
[TD="align: right"]$0[/TD]
[TD="align: right"]$1,999[/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]

And Return "Tier 3" in the cell holding the formula

Entering $6,000 would return Tier 2 (and so on).

I'm sure I can write a long formula with 4 different IF statements, but wondered if there was a more efficient way?
Or if there's not... what is the best syntax to go with?

Thanks so much
-Dave
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
EDIT: The formula requires col D to be sorted descending as it is here.
Sheet10


ABCD
Tier 2Tier 1

Tier 2

Tier 3

Tier 4

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:165px;"><col style="width:105px;"><col style="width:109px;"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]
[TD="align: right"]6000[/TD]
[TD="bgcolor: #ccccff"]Account Tiers (Column B)[/TD]
[TD="bgcolor: #ccccff"]Low (Column C)[/TD]
[TD="bgcolor: #ccccff"]High (Column D)[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]

[TD="align: right"]$10,000 [/TD]
[TD="align: right"]$9,999,999,999 [/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]

[TD="align: right"]$4,000 [/TD]
[TD="align: right"]$9,999 [/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]

[TD="align: right"]$2,000 [/TD]
[TD="align: right"]$3,999 [/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]5[/TD]

[TD="align: right"]$0 [/TD]
[TD="align: right"]$1,999 [/TD]

</tbody>

Spreadsheet Formulas
CellFormula
A2=INDEX($B2:$B5,MATCH(A1,$D$2:$D$5,-1))

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0
Thanks so much Joe,

for my own education, why does Col D need to be sorted descending?
You are welcome.

Because you are not looking for an exact match the formula tries to find the best match in col D that is less than or equal to the A1 value. if col D is not sorted descending the formula may return an erroneous result.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top