Excel functions · Logic
IFS function in Excel
IFS checks a list of conditions in order and returns the value paired with the first one that's true, which replaces a chain of nested IFs. It's made for grade bands, tiers and status labels; end it with TRUE as a catch-all so a value that meets no condition doesn't return #N/A.
Last reviewed
Syntax
=IFS(logical_test1, value_if_true1, [logical_test2, value_if_true2], ...)- logical_test1required
- The first condition to check.
- value_if_true1required
- What to return if logical_test1 is TRUE.
- logical_test2, value_if_true2, ...optional
- More pairs, up to 127, checked in order. The first TRUE wins.
- Order matters: test the highest band first (>=90 before >=80), or every score lands in the first band.
- There's no "else" argument. Use TRUE as the last test for a default value.
Which versions have IFS
Microsoft 365, Excel for the web, and Excel 2019 or later (Windows and Mac). Not in Excel 2016.
| Version | Has it |
|---|---|
| Microsoft 365 (Windows and Mac) | Yes |
| Excel for the web | Yes |
| Excel 2024 | Yes |
| Excel 2021 | Yes |
| Excel 2019 | Yes |
| Excel 2016 | No |
Google Sheets
Google Sheets has IFS with the same arguments.
Examples
The examples use this sample sheet.
| Row | A | B |
|---|---|---|
| 1 | Student | Score |
| 2 | Maya | 92 |
| 3 | Luis | 78 |
| 4 | Priya | 85 |
| 5 | Tom | 64 |
| 6 | Zoe | 55 |
1.Grade a top score
=IFS(B2>=90, "A", B2>=80, "B", B2>=70, "C", B2>=60, "D", TRUE, "F")Result: A
Maya's 92 meets the first condition.
2.Grade a middle score
=IFS(B3>=90, "A", B3>=80, "B", B3>=70, "C", B3>=60, "D", TRUE, "F")Result: C
Luis's 78 fails the first two tests and meets the third.
3.The catch-all
=IFS(B6>=90, "A", B6>=80, "B", B6>=70, "C", B6>=60, "D", TRUE, "F")Result: F
Zoe's 55 meets none of the bands, so the final TRUE returns F. Without it the result would be #N/A.
Common errors and fixes
| Error | Why it happens | Fix |
|---|---|---|
| #N/A | No condition is true. | Add TRUE and a default value as the last pair. |
| #VALUE! | A test returns something other than TRUE or FALSE, such as text. | Make each test a comparison, like B2>=90. |
| #NAME? | Your Excel doesn't have IFS (Excel 2016 or older). | Use nested IF functions instead. |
Do it with GPTExcel
Skip writing IFS by hand
Upload your Excel or CSV file to Chat and ask in plain English. GPTExcel writes the formula for your file and your version of Excel or Google Sheets.
Give each student a letter grade from their score: A 90+, B 80+, C 70+, D 60+, else F.
Done. I used IFS on your sheet and checked the results against your data.
- Written for your platform and version
- Checked against your actual data
- Newest functions looked up in official docs
IFS questions
- What's the difference between IF and IFS?
- IF tests one condition with a true and a false result. IFS tests several conditions in order and returns the first match, so it replaces nested IFs. IFS has no false branch; use TRUE as the last test instead.
- How do I add an else to IFS?
- Make TRUE the last condition: …, TRUE, "F"). It's always true, so it catches everything the earlier tests missed.
Skip the formula hunt
Upload a spreadsheet and ask in plain English. Free plan, no credit card.
Start free