Quick answer
The basic pattern is =IF(test, value_if_true, value_if_false). Write the rule in plain English first, then translate the comparison and outputs.
Use explicit comparisons
Examples include B2>=100, C2="Paid" or D2="" for a blank. Put text outputs in quotation marks and keep numbers unquoted.
Avoid deep nesting
Several nested IFs become difficult to audit. Consider IFS, lookup tables or separate helper columns when the rule has many bands.
Separate missing from zero
A blank input, a genuine zero and an error can mean different things. Decide which state should produce a label, calculation or warning.
Common questions
Why does Excel show the formula instead of the result?
The cell may be formatted as Text or Show Formulas may be enabled.
Can IF return a blank-looking result?
Yes, use an empty text string "" as an output, while remembering it is not always identical to a truly empty cell.
Sources and editorial approach
This article was written as an independent study aid and checked against the official references below. We review time-sensitive facts when the article is updated. Read our editorial policy.