# Nested IF(nested if statements) and if(nested if statements) logic

#### anderma8

##### New Member
I think I read all of the "nested if statements" in the forum but I couldn't find my solution - so sorry for starting another one! Here is my situation:

Field AM5 possible values: F, FA, LTI, RMTC, OI, OILWL, [blank]
Field AN5 possible values: E, DC TP

IF AM5 contains: F, LTI, RMTC, OI, OILWL
AND
IF AN5 contains either E or DC

I have the individual nested statements working but not a combined one.

Mark

Last edited:

### Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

#### Eric W

##### MrExcel MVP
Try:

=IF(AND(OR(AM5={"F","LTI","RMTC","OI","OILWL"}),OR(AN5={"E","DC"})),"True","False")

#### anderma8

##### New Member
I ended up using it on a test sheet and it works! It must be something on my end. THANK YOU VERY MUCH!

Last edited:

You're welcome!

#### anderma8

##### New Member
Just for kicks, what would it look like if a 3rd nested if of numbers was to be used? I tried:
=IF(AND(OR(D9={"F","LTI","RMTC","OI","OILWL"}),OR(E9={"E","DC"}),OR(f9={1,2}),"TRUE","FALSE"))

but this does not work.

#### anderma8

##### New Member
GOT IT:
=IF(AND(OR(D9={"F","LTI","RMTC","OI","OILWL"}),OR(E9={"E","DC"}),OR(F9={1,2})),"TRUE","FALSE")

It took a walk and a cup of coffee!