Comparison guide

IF vs AND vs OR in Excel
how they work together

IF tests one condition. AND and OR test multiple. Here's how to combine them for powerful logical formulas.

EP
ExcelPro·Sep 22, 2026

IF — test one condition

=IF(condition, value_if_true, value_if_false) =IF(A2>100, "High", "Low") -- One condition, two outcomes

AND — all conditions must be true

=AND(condition1, condition2, ...) =AND(A2>100, B2="Active") -- Returns TRUE only if BOTH conditions are true -- Returns FALSE if any condition is false

OR — at least one condition must be true

=OR(condition1, condition2, ...) =OR(A2="North", A2="South") -- Returns TRUE if ANY condition is true -- Returns FALSE only if ALL conditions are false

Combining IF with AND

=IF(AND(A2>100, B2="Active"), "Qualify", "No") -- "Qualify" only if BOTH: A2>100 AND B2="Active" =IF(AND(A2>=18, A2<=65), "Working age", "Outside range") -- Between 18 and 65 inclusive

Combining IF with OR

=IF(OR(A2="North", A2="South"), "UK", "International") -- "UK" if region is North OR South =IF(OR(B2<0, B2>1000), "CHECK", "OK") -- Flag if value is negative OR over 1000

Nesting AND and OR together

=IF(AND(A2="Active", OR(B2="Gold", B2="Platinum")), "VIP", "Standard") -- Active AND (Gold OR Platinum) = VIP -- Brackets control evaluation order
💡 AND and OR return TRUE/FALSE on their own

You don't always need IF. In conditional formatting or data validation, AND and OR work directly: use =AND(A2>0, A2<100) as a formula rule without wrapping in IF.

FunctionReturns TRUE whenUse with IF when
ANDALL conditions are trueMultiple conditions must all be met
ORANY condition is trueAny one of several conditions qualifies
NOTThe condition is falseYou want the opposite of a condition

Now practise it for real

Practice this formula yourself — type it in a real spreadsheet and get instant feedback. Free, no download needed.

Start the Excel Basics track free →
Keep reading