# Mind blank - IF AND statement

#### Jay3

##### Board Regular
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

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.

#### Jay3

##### Board Regular
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

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
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
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

Replies
7
Views
74
Replies
1
Views
218
Replies
3
Views
2K
Replies
1
Views
341
Replies
2
Views
59

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.

### Which adblocker are you using?

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

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