Nested IF functions

FMiller017

New Member
Joined
Apr 24, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there

I am trying to determine where various actual gross margin percentages would fall within a benchmark range of gross margin percentages (i.e. below minimum, minimum to 25th percentile, 25th percentile to median, median to 75th percentile, 75th percentile to maximum and above maximum).

Example:
My actual gross margin is 16% and my benchmark range of gross margins is as follows:
Minimum - 13%
25th percentile - 37%
Median - 55%
75th percentile - 66%
Maximum - 119%

I want the formula, which compares my actual 16% to the above benchmark values, to return a value of "Between the minimum and 25th percentile".

I am battling to get Excel to accept my below nested IF function formula. I have played around with brackets but nothing seems to be working so feeling pretty stupid and even ChatGPT seems to have run out of suggestions! =( Any help would be much appreciated.

=IF(AH106 < AH82 "Below Minimum", IF(AH106 < AH83, "Between Minimum and 25th Percentile", IF(AH106 < AH84, "Between 25th Percentile and Median", IF(AH106 < AH85, "Between Median and 75th Percentile", IF(AH106 < AH86, "Between 75th Percentile and Maximum", "Above Maximum")))))
 

Attachments

  • Excel extract.png
    Excel extract.png
    23.3 KB · Views: 28

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try:
Book1
ABC
1Minimum13%
2Between Minimum and 25th Percentile14%
325th Percentile37%
4Between 25th Percentile and Median38%
5Median55%
6Between 25th Percentile and Median56%
775th Percentile66%
8Between Median and 75th Percentile67%
9Maximum119%
10Above Maximum120%
11
1214.0%Between Minimum and 25th Percentile
Sheet5
Cell Formulas
RangeFormula
C12C12=XLOOKUP(B12,B1:B10,A1:A10,,-1)
 
Upvote 0
Thank you All!

The formula worked after I replaced all commas with semi colons. :oops:
 
Upvote 0
If you don't need a text output you could try and use PERCENTRANK.INC/PERCENTRANK.EXC to get the rank.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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