Nested IF Statement

toleafs

Active Member
Joined
Jun 27, 2005
Messages
498
I've been looking for this on the message board but no luck. Any help would be GREATLY appreciated... I am trying to write a statement that will give me a result based on the value in cell I2.
For instance, if cell I2 was 4 - result PH; but if cell I2 was 9 - result is EH.

IF(I2>=0, I2<=6,"PH", IF(I2>7, I2<=10, "EH"))

hope this makes sense.
Thanks
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
You would want to put the formula in that cell
=IF(and(I2>=0, I2<=6),"PH", IF(and(I2>7, I2<=10), "EH",""))

edit: should that be >=7 not >7
 
Last edited:
Upvote 0
I am using: =IF(AND(I2>=0, I2<=6),"PH", IF(AND(I2>7, I2<=10), "EH")) , it returns FALSE.

....I2 Contains the formula: =Right(H2,2)
 
Upvote 0
The RIGHT function returns a Text string. Change your formula to
Code:
=RIGHT(H2,2)*1
lenze
 
Upvote 0
I ran into another issue....I have 7 conditions to meet and excel does not allow me to nest 7 IF statements. Any ideas?
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

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