Function · Logical

Excel IFS function

The Excel IFS function returns the result of the first test that is true. A score of 86 is a B when the grade bands are tested from the top.

Excel 2019, Excel 2021, Excel 2024, Microsoft 365, and Excel for the web. Also in Google Sheets. Excel 2016 does not have it.

Syntax =IFS(logical_test1, value_if_true1, ...)

IFS
=IFS(B1>=90,"A",B1>=80,"B",B1>=70,"C",B1>=60,"D",TRUE,"F")

Arguments

NameRequiredWhat to pass
logical_test1RequiredThe first test. IFS stops at the first test that is TRUE.
value_if_true1RequiredThe result for that test.
logical_test2OptionalMore pairs, up to 127 tests. Put TRUE last if you want a default.

Examples

A score of 86 on a 90/80/70/60 grade scale

=IFS(B1>=90,"A",B1>=80,"B",B1>=70,"C",B1>=60,"D",TRUE,"F")

Result B

=IFS(B1>=90,"A",B1>=80,"B",B1>=70,"C",B1>=60,"D",TRUE,"F")B2
Grade
AB
1Score86
2GradeB
A picture of the sheet, not a live calculator. The last test is TRUE, so a score below 60 is F rather than #N/A.

IFS walks a list of tests and returns the result of the first one that is TRUE. A score of 86 is not at least 90, and it is at least 80, so the grade is B. The C, D, and F tests are not consulted. Nested IF does the same job. IFS is the form that stays readable once there are four or five bands.

Order is the whole trick. A first test of >=60 is TRUE for 86, and the function returns D. The final TRUE is the default, the same role as the last argument of IF. Leave it off and a score that misses every band returns #N/A. Excel 2016 does not have IFS. Nested IF still works there.