Trouble with Nested If Function

HuckFinn

New Member
Joined
Aug 1, 2006
Messages
45
Actual Salary (M9)Minimum (T9)1st. Qtr. (U9)Market Rate (V9)3rd Qtr. (W9)Maximum (X9)Quartile Position (Y9)
436803172037010423004758552870Q3

I am having trouble with the formula below:
=IF($M9<T9,"Below Min",IF($M9<=$U9,"Q1",IF($M9>$U9,"Q2",IF($M9>$V9,"Q3",IF($M9>$W9,"Q4",IF($M9>$X9,"Above Max"))))))

It is returning a Q2 in the Quartile Position, when I am expecting a Q3. The Actual Salary is greater than the Market Rate, but less than or equal to the 3rd Qtr. Any idea on where I am going wrong here?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
When you are comparing a range of numbers using the > operator, always compare the values from the highest to the lowest.
When you are comparing a range of numbers using the < operator, always compare the values from the lowest to the highest.
In this case, the formula below gives you the correct answer:
=IF(M9<T9,"Below Min",IF(M9>X9,"Above Max",IF(M9>W9,"Q4",IF(M9>V9,"Q3",IF(M9>U9,"Q2",IF(M9>T9,"Q1"))))))

1663897265684.png
 
Upvote 0
Using LOOKUP
Code:
=IFERROR(LOOKUP($M9,$T9:$X9,{"Q1","Q2","Q3","Q4","Over Max"}),"Below Min")
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
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