Nested IF OR statements in Excel

0
1734

IF with multiple OR conditions

=IF(OR(A2=””,B2=””, C2=””),”Incomplete”,””)

Nested IF OR statements

You want to test a few sets of OR criteria and return different values depending on the results of those test criteria, write an individual IF formula for each set of “this OR that” criteria, and nest those IF’s into each other.

Simple example

=IF(OR(A2=”apple”, A2=”orange”), “Fruit”, IF(OR(A2=”tomato”, A2=”cucumber”), “Vegetable”, “”))

Building on a more realistic case

Example you want to conform all version countries to USA and Trinidad & Tobago

=IF(OR(W3=”United States”,W3=”U.S.A”), “USA”, IF(OR(W3=”Trinidad”,W3=”Trinidad, W.I.”, W3=”Trinidad, WI”, W3=”Trinidad, West Indies”, W3=”Trinidad, W.I.”, W3=”Trinidad, WI”, W3=”Trinidad WI”, W3=”Trinidad, WI”, W3=”Trinidad and Tobago W.I.”, W3=”Trinidad & Tobago”), “Trinidad & Tobago”, W3))

IF AND OR statement

example: You want buy MSFT or ABML if they are above $10

=IF(AND(OR(A2=”MSFT”,A2=”ABML”), B2>10), “Buy”, “”)

Case-sensitive IF OR formula

IF(OR(EXACT(cell,condition1“), EXACT(cell,condition2“)), value_if_true, value_if_false)