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 you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
58,949
Office Version
  1. 365
Platform
  1. Windows
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.
 
Solution

Jay3

Board Regular
Joined
Jul 3, 2009
Messages
237
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!!
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
58,949
Office Version
  1. 365
Platform
  1. Windows
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.
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
11,391
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.
 

Jay3

Board Regular
Joined
Jul 3, 2009
Messages
237
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
 

Forum statistics

Threads
1,141,051
Messages
5,703,957
Members
421,321
Latest member
blusky4

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
Top