Excel functions / Logical
IFS
Tests several conditions in order and returns the result for the first one that is true.
Syntax
=IFS(test1, value1, [test2, value2], ...)Arguments
test, value pairs | Each condition followed by what to return if it is the first true one. |
|---|
How it works
IFS replaces chains of IFs inside IFs. It checks each test in turn and stops at the first TRUE.
Order matters: put the strictest test first. Finish with TRUE and a value to catch everything else, otherwise unmatched rows show #N/A.
Example
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Student | Score | Attended | ||
| 2 | Ana | 72 | Yes | B | |
| 3 | Ben | 45 | Yes | ||
| 4 | Cal | 88 | No | ||
| 5 |
Result: B. 72 is not 80 or more, but it is at least 60.
Tips
- Available in Excel 2019 and later.
Practise IFS
Try it yourself in a real spreadsheet, with instant feedback on every answer.