How it works.
The IF function lets you make logical comparisons between a value and what you expect. An IF statement has two results: the first is if your comparison is True, the second is if your comparison is False.
💡 In simple terms.
Checks whether a condition is true or false. If true, it outputs one value; if false, it outputs another.
"Think of this like a referee checking a score: IF the score is 70 or higher, they shout "Pass!"; otherwise, they shout "Fail!"."
Syntax guide.
Parameters
A condition that can be evaluated to TRUE or FALSE.
The value to return if logical_test evaluates to TRUE.
The value to return if logical_test evaluates to FALSE.
Default: "Fail"Interactive formula builder.
Fill in the input arguments below to construct your custom formula string. Copy it directly to paste into your Excel spreadsheets.
Best Practices
- You can nest multiple IF statements inside each other to handle more than two outcomes, although the IFS function is now preferred.
- To leave a cell blank on FALSE, use empty quotes: "" as the value_if_false.
Common Gotchas
- Avoid nesting more than 3-4 IF functions, as they become extremely hard to debug and maintain. Consider using IFS or VLOOKUP/XLOOKUP tables.