# Multiple if and Statments

1. ## Multiple if and Statments

Hi,

For the life of me I can not work out why my formula won't work.

=IF(AND(E7="F",N7>0),38,N7),IF(AND(E7="P",N7<38),N7,38),IF(E7="C",N7)

Basically what I am trying to achieve is in cell E7 if it equals an F and Cell N7 is great than 0, then equal 38 or o. then if E7 equals a P, and N7 is =to or less than 38 be N7, or 38 and if E7 equals a C just be N7

Any help would be greatly appreciated

2. ## Re: Multiple if and Statments

This is a complete IF statement in its own right; condition, result if true, result if false
=IF(AND(E7="F",N7>0),38,N7),

This is also a complete IF statement in its own right;
IF(AND(E7="P",N7<38),N7,38),

And this is a complete IF statement in its own right, although it would return False if the condition was not met;
IF(E7="C",N7)

For a Nested IF, you would need to replace the first false result by the second IF statement, and so on.

Regards, TMS

3. ## Re: Multiple if and Statments

Your IFs are not nested. It should be =IF(x, TRUE, IF(y, TRUE, IF(z, TRUE, FALSE)))

In your case (I am a little unclear of what you want if all conditions fail):
=IF(E7="C", N7, IF(AND(E7="F",N7>0),38,IF(AND(E7="P",N7<38),N7,"FAIL")))

This checks for "C", then "F" & >0, then "P" & <38, if none then put FAIL.

4. ## Re: Multiple if and Statments

Hey TMS,

Thank you, I knew it was something so basic that I should have picked it up. I have been working on spreadhseets all week and have formuals coming out of my ears... Just needed that second pair of eyes to see where I was going wrong.

Thank you very much for your help!

Cheers

5. ## Re: Multiple if and Statments

You're welcome.

New quick method:

Or you can use this way:

How to mark a thread Solved
Go to the first post
Click edit
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save

You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

6. ## Re: Multiple if and Statments

Hey Chance2,

Thanks very much, that helped me also.

Cheers

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1