Excel Guide

Excel IF Formulas, From Basic to Nested

IF is the formula that turns a spreadsheet from a calculator into something that makes decisions. Here's the pattern, how to combine conditions, and when nesting IFs stops being the right tool.

The basic IF pattern

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

=IF(condition, value_if_true, value_if_false) =IF(A2>=60, "Pass", "Fail")

That single pattern covers most of what you'll need: pass/fail thresholds, flagging over-budget rows, labeling categories.

Combining conditions with AND / OR

When a decision depends on more than one thing, wrap your conditions in AND (all must be true) or OR (at least one must be true):

=IF(AND(A2>=60, B2="Submitted"), "Pass", "Fail") =IF(OR(A2="Urgent", A2="High"), "Escalate", "Normal")

Nested IF: multiple outcomes

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")))

This works, but readability drops fast past two or three levels of nesting. That's 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.

Common mistake: forgetting the order matters in a chain of thresholds. IF(A2>=70, "C", IF(A2>=90, "A", ...)) will never return "A", because anything ≥90 already satisfies ≥70 and returns early. Always check from the highest threshold down (or the lowest up), not in random order.

Try it yourself

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

Start practicing conditional formulas →