Excel Guide

IF AND OR in Excel: How to Combine Conditions Without Breaking Your Formula

Put AND or OR inside IF, not words between conditions. The pattern is =IF(AND(condition1, condition2), value_if_true, value_if_false) when every condition must be true, and =IF(OR(condition1, condition2), value_if_true, value_if_false) when any one of them is enough. Excel does not read a bare word like AND typed between two comparisons — it has to be a function wrapped around them. Practise it: Basic IF — 10 Excel practice problems.

Start with plain IF

Every IF formula has the same three parts: a condition, what to return if it is true, and what to return if it is false.

=IF(A2>=60, "Pass", "Fail")

That one pattern covers pass/fail thresholds, flagging over-budget rows, and labelling categories. It only breaks down when the decision depends on more than one thing — and that is where most people go wrong.

AND: every condition must be true

Use AND when a result should only happen if all the conditions hold. A student passes only if the score is at least 60 and the work was submitted:

=IF(AND(A2>=60, B2="Submitted"), "Pass", "Fail")

A "between two numbers" test is the same idea — a lower limit and an upper limit, both inside AND:

=IF(AND(A2>=2, A2<=8), "OK", "Out of range")

Writing =IF(2<=A2<=8, ...) does not test "between" in Excel. Split it into two conditions inside AND, as above.

OR: any one condition is enough

Use OR when any single condition should trigger the result. A ticket is escalated if its priority is Urgent or High:

=IF(OR(A2="Urgent", A2="High"), "Escalate", "Normal")

The same shape works for weekends:

=IF(OR(A2="Sat", A2="Sun"), "Weekend", "Weekday")

Text comparisons ignore capital letters, so "yes" matches "Yes" — you do not need a separate condition for each capitalisation.

Combining them: "this, or both of these"

Real rules are often a mix. Eligibility might be a high score on its own, or a slightly lower score combined with a high income:

=IF(OR(A2>=700, AND(A2>=650, B2>=80000)), "Eligible", "Not eligible")

Read it from the inside out: the AND pair must both be true, or the single high score alone is enough. AND and OR accept as many conditions as you need, separated by commas.

When there are more than two outcomes, watch the order

For more than two possible outcomes, you can nest one IF inside another:

=IF(A2>=90, "A", IF(A2>=80, "B", IF(A2>=70, "C", "F")))

The order matters: check from the highest threshold down. If you test >=70 first, anything scoring 90 or above already satisfies it and returns early, so the "A" branch is never reached. Past two or three levels of nesting, readability drops fast — that is usually the sign to reach for IFS instead, which lists condition/result pairs without the nested parentheses:

=IFS(A2>=90, "A", A2>=80, "B", A2>=70, "C", TRUE, "F")

The final TRUE, "F" pair acts as a catch-all default, similar to the innermost "else" in a nested IF.

Practise it, don't just read it

Reading the pattern once rarely sticks; writing the formula against a data table does. PractiseSkills' Basic IF topic works through 10 problems step by step — pass or fail a test score, flag overdue invoices, label inventory as low or ok — and its AND / OR / NOT topic works through 10 more, from checking two conditions with AND to requiring two conditions for a discount. On each topic page, 3 of the 10 exercises are free with no sign-up needed, and you are graded on the formula you write.

Read the full explanation, with more examples, in the IF AND / IF OR Formula in Excel, With Examples guide. Then try Basic IF Exercises: 10 Excel Practice Problems and AND / OR / NOT Exercises: 10 Excel Practice Problems.

Try it yourself

Practice IF, AND, OR, and IFS with real interactive exercises and instant feedback.

Start practicing IF with AND and OR →