How to use IFS in Excel
IFS checks several conditions in order and returns the result for the first one that's true. It replaces long chains of nested IFs — ideal for grades, tiers and categories.
Syntax
=IFS(test1, value1, [test2, value2], ...)
logical_test1 | The first condition. |
value_if_true1 | Result when it's true. |
[logical_test2, value_if_true2], … | More pairs, checked top to bottom. |
Examples
=IFS(B2>=90,"A", B2>=75,"B", B2>=60,"C", TRUE,"F")Letter grades.=IFS(C2>100000,"Gold", C2>50000,"Silver", TRUE,"Standard")Customer tiers.From nested IF to IFS
The same tiers written both ways. IFS lists the test and the result in pairs, with no brackets to count. Excel checks the pairs from left to right and stops at the first TRUE.
=IF(B2>=100000, "Gold", IF(B2>=50000, "Silver", IF(B2>=10000, "Bronze", "Standard")))Nested IF: three levels of brackets.=IFS(B2>=100000, "Gold", B2>=50000, "Silver", B2>=10000, "Bronze", TRUE, "Standard")The same with IFS. TRUE at the end catches everything else.Risk ratings and overdue buckets
IFS is perfect for buckets: days past due, credit scores, age bands. Always write the tests in order, from the strictest to the loosest.
=IFS(C2>90, "90+", C2>60, "61-90", C2>30, "31-60", C2>0, "1-30", TRUE, "Current")Days past due into the usual bank buckets.=IFS(D2="", "Missing", D2<0, "Check", TRUE, "OK")Data checks: blank first, then negative values.Common mistakes
- #N/A error
- None of the conditions is true. Add
TRUE, "default"as the last pair. - Wrong order
- Conditions are checked top to bottom — put the strictest (
>=90) first, otherwise everyone above 60 gets "C". - #NAME? in older Excel
- IFS needs Excel 2019 or Microsoft 365. Use nested IFs in older versions.
Frequently asked questions
Why does IFS return #N/A?
None of the tests is TRUE, and IFS has no "otherwise" by default. Add TRUE, "…" as the last pair.
Which Excel versions have IFS?
Excel 2019, Excel 2021, Microsoft 365 and Excel for the web. In Excel 2016 and older it shows #NAME?, so use nested IF there.
What's the difference between IFS and SWITCH?
IFS tests conditions like B2>=50000. SWITCH compares one value with a list of exact matches, like a region code. Use SWITCH when every test is "equals".
How many conditions can IFS have?
Up to 127 pairs. With more than five or six tiers, a small lookup table and XLOOKUP with match mode -1 is easier to keep up to date.
Available in: Excel 2019, 2021, Microsoft 365, Excel for the web