Alternate to nested IFs, comparing values in between percentages

Mplz

New Member
Joined
Jul 19, 2024
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
Hello all!

There has to be an easier way to accomplish what I'm after, would love any ideas. I am trying to write a formula that spits out a value based on what range the percentage falls in. I'm currently using nested IFs to determine if the percentage falls in between the ranges below and gives me the value in the third column.

3.0%​
3.4%​
1500​
3.5%​
3.9%​
1410​
4.0%​
4.4%​
1320​
4.5%​
4.9%​
1230​
5.0%​
5.4%​
1140​
5.5%​
5.9%​
1050​


Excel Formula:
=IF($P$10<$AL$17,$AN$17,IF(AND($P$10>$AL$18,$P$10<$AM$18),AN18,IF(AND($P$10>$AL$19,$P$10<$AM$19),$AN$19,IF(AND($P$10>$AL$20,$P$10<$AM$20),$AN$20,IF(AND($P$10>$AL$21,$P$10<$AM$21),$AN$21,IF(AND($P$10>$AL$22,$P$10<$AM$22),$AN$22,IF(AND($P$10>$AL$23,$P$10<$AM$23),$AN$23,IF($P$10=$AL$24,AN24,IF($P$10>$AL$24,$AN$25,"0")))))))))

This code is basically if my value is greater than 3, and less than 3.4, give me 1500, if false repeat for 3.5-3.9 etc. I've tried to mess around with Index Match but haven't found any solution yet. Thanks in advance!
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
How about
Fluff.xlsm
ABCJKL
1
23.1%15003.00%3.40%1500
33.9%14103.50%3.90%1410
45.2%11404.00%4.40%1320
54.50%4.90%1230
65.00%5.40%1140
75.50%5.90%1050
Sheet6
Cell Formulas
RangeFormula
B2:B4B2=INDEX($L$2:$L$7,MATCH(A2,$J$2:$J$7,1))
 
Upvote 0
Solution
Fluff this is perfect!

I was overthinking it trying to find a way to compare the two percentage values, but since they are continuous it really only needs to look at one column. Thank you so much.

Adding here in case someone finds it. I have edge cases that capture everything outside of this range, and in this case I had to add a 0% to get everything below 3% and 6.1% to get everything above 6%.

Garage KPI.xlsx
AIAJAKALAMAN
17Percent2%0.0%1500
18Amount15003.0%3.4%1500
193.5%3.9%1410
204.0%4.4%1320
214.5%4.9%1230
225.0%5.4%1140
235.5%5.9%1050
246.0%960
256.1%0
KPI Tracker
Cell Formulas
RangeFormula
AJ18AJ18=INDEX($AN$17:$AN$25,MATCH(AJ17,$AL$17:$AL$25,1))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,139
Members
453,021
Latest member
Justyna P

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