Mind blank - IF AND statement

Jay3

Board Regular
Joined
Jul 3, 2009
Messages
237
Hi,

I need an if statement to return high medium or low based on a 1 - 10 value but I can only get 2 conditions to work and a FALSE if the value is HIGH.

What I'm I doing wrong?

Rich (BB code):
=IF(D10<=3,"Low",IF(AND(D10>3,D10<=6),"Med"))

I thought I could just do ,"High" in between the 2 last brackets but I get "Too many arguments".

Thanks,
Jay
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Try:
VBA Code:
=IF(D10<=3,"Low",IF(D10<=6,"Med","High"))

Note that you do not need an AND if you you keep working your way up or down (from "lowest to highest" or "highest to lowest"), as a nested IF will STOP at the first true part it finds and ignore eveything else after that.
 
Upvote 0
Solution
Try:
VBA Code:
=IF(D10<=3,"Low",IF(D10<=6,"Med","High"))

Note that you do not need an AND if you you keep working your way up or down (from "lowest to highest" or "highest to lowest"), as a nested IF will STOP at the first true part it finds and ignore eveything else after that.
Thanks!!
 
Upvote 0
You are welcome!

Just to clarify why you don't need an AND a little further, with a nested function like the one I posted, in D10 was less than 3, it would hit the first IF and stop there. It would never get to the second one. Any value less than 3 will never get past the first one to the second one. That is why you don't need to check to see if it is less than 3 on the second IF.
 
Upvote 0
You could also do something like this:

Excel Formula:
=LOOKUP(D10,{1,4,7},{"Low","Medium","High"})

It's about a wash for 3 tiers, but if you have more, this scales better.
 
Upvote 0
You could also do something like this:

Excel Formula:
=LOOKUP(D10,{1,4,7},{"Low","Medium","High"})

It's about a wash for 3 tiers, but if you have more, this scales better.
Never seen that before!? Interesting! Thanks
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,369
Members
449,080
Latest member
Armadillos

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