How IF works
IF shows one thing when a test is true and another when it is false. Learn its three parts with a stock list and a delivery charge.
Task 1The three parts of IF5 questions
IF lets a cell show one thing or another, depending on a test. It has three parts, split by commas, and text goes in double quotes: =IF(B2<C2,"Reorder","OK").
- Test
- something that is either true or false, such as B2<C2
- Value if true
- what the cell shows when the test is true
- Value if false
- what the cell shows when the test is false
- =
- equal to
- >
- more than
- <
- less than
- >=
- more than or equal to
- <=
- less than or equal to
- <>
- not equal to
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Item | In stock | Reorder level | Action |
| 2 | Copier paper | 40 | 25 | |
| 3 | Envelopes | 12 | 20 | |
| 4 | Ring binders | 30 | 30 | |
| 5 | Marker pens | 8 | 15 |
Task 2IF can return a number3 questions