Conditional IF

sanjog

New Member
Joined
Jan 11, 2013
Messages
26
Hello Folks,

I have following conditions that I want to check on a cell

1. IF Value >140 then it returns A
2. IF Value between 120-140 it returns B
3. IF Value is between 100-120 it returns C
4. IF Value is between 80-100 it returns D
5. IF Value is <80 it return E

How can I do this in a single formula

Help much appreciated
 
=IF(A1>140,"A",IF(AND(A1>=120,A1<=140),"B",IF(AND(A1>=100,A1<=120),"C",IF(AND(A1>=80,A1<100),"D",IF(A1<80,"E","Error")))))

You may want to adjust the boundaries (e.g. what if the value is 100 exactly - should it be "B" or "C"?
 
Upvote 0
I think Excel 2007 is bugging me here to force to use logical test on IF. It says formula you typed contains an error. Anglais428, which version of excel are you using ?
 
Upvote 0

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