What you will learn
- Choose between more than two answers
- Put the tests in the right order
How it works
Put a new IF where the "false" answer goes. Check the highest grade first. As soon as a test is true, the spreadsheet stops checking.
Count your parentheses! You need one ) at the end for each IF.
Formulas at a glance
=IF(B2>=90,"A",IF(B2>=80,"B",…)) | The pattern to follow |
Example
Write the formula to give Ana a grade: A for 90 or more, B for 80 or more, C for 70 or more, otherwise F.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Student | Score | Grade | Passed? |
| 2 | Ana | 92 | ||
| 3 | Ben | 85 | ||
| 4 | Cleo | 71 | ||
| 5 | Dev | 66 | ||
| 6 | Eli | 79 | ||
| 7 | Fay | 98 | ||
| 8 |
Click C2 and type =IF(B2>=90,"A",IF(B2>=80,"B",IF(B2>=70,"C","F"))), then press Enter.
The answer is A.
When to use it
- Letter grades: A, B, C, F
- Price bands or shipping levels
- Any label with three or more choices
Common mistakes
- Checking the lowest level firstStart with the highest test, like B2>=90.
- Not enough ) at the endYou need one ) for each IF.
- Too many levels to readIFS or a lookup table can be easier.
Quick check
Why check the highest grade first?
- It is faster
- Once a test is true, the rest are skipped
- The spreadsheet sorts them
- It doesn't matter
Show the answer
B. Once a test is true, the rest are skipped If you checked 70 first, a 95 would get a C!
Practice it on a real sheet
Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.