More than two answers: IF inside IF
Three possible answers: Merit for 70 or more, Pass for 50 or more, otherwise Fail.
keyboard Typing formulas is easiest on a computer with a keyboard.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | Score | Result | |
| 2 | Tariq | 76 | ||
| 3 | Nadia | 79 | ||
| 4 | Daniel | 64 | ||
| 5 | Quinn | 98 | ||
| 6 | Jamal | 70 | ||
| 7 | Isla | 30 | ||
| 8 | Kofi | 50 | ||
| 9 | ||||
| 10 | ||||
| 11 | ||||
| 12 |
How IF and IFS works
How do you get three answers from
IF?One
IFpicks between two answers. For three, put a secondIFwhere the "ifFALSE" answer goes:=IF(B2>=70,"Merit", IF(B2>=50, "Pass", "Fail")) Why does the order matter?
Excel checks the questions in order and stops at the first one that is
TRUE. So check the highest band first: a score of 85 is also at least 50, and ifB2>=50came first, it would never get as far as "Merit".What is
IFS?Newer Excel also has
IFS, which lists the questions and answers in pairs without the brackets piling up.TRUEas the last question means "anything else":=IFS(B2>=70,"Merit", B2>=50, "Pass", TRUE, "Fail")
Know someone fighting with a spreadsheet? Send them this page.