IF
Shows one thing when a test is true and another when it is not.
- Decide
- Practised in 3 lessons
Worked example
C2=IF(B2<30,"Water","Leave")
| Row | A | B | C |
|---|---|---|---|
| 1 | Plant | Soil moisture % | Today |
| 2 | Fern | 22 | |
| 3 | Aloe | 48 |
A test first, then the two things it can show.
How to write it
=IF(logical_test, value_if_true, [value_if_false])
logical_test- A comparison that is true or false, like B2>100.
value_if_true- What to show when it is true.
value_if_false- What to show when it is not.
Try IF yourself
Real tasks in a spreadsheet, checked on changed data. A free account saves your work and checks your answers.
Practise it freeWatch out for
- Text to show needs quotes; a number or a cell does not.
- Leave out the last part and Excel shows FALSE.