← Back to level 1
Level 1Next
IF
Returns one value when a condition is true and another when it is false.
Syntax
=IF(logical_test, value_if_true, value_if_false)Step-by-step explanation
- 1Write a condition that evaluates to TRUE or FALSE.
- 2Define what should happen in both outcomes.
- 3Combine IF with logical functions to build smarter workflows.
Common mistakes
Missing commas or parentheses
Putting text in the wrong quotation marks
Over-nesting too many IF statements
Example table
A quick scenario to connect the syntax to the result.
| 82 | Pass |
| 45 | Fail |
Formula
=IF(A1>=50,"Pass","Fail")
Result
Pass
Worked example
- 1Check the score in the first data row and compare it with the pass mark.
- 2Use =IF(A1>=50,"Pass","Fail") to test the condition and return the correct label.
- 3The sample result should be Pass.
Practice area
Mark results as Pass when the score is 50 or more.
Match against the syntax block above.