IFS Generator
Test several conditions in order and return the result of the first one that is true, without nesting IF statements.
IFS
Test several conditions in order and return the result of the first one that is true, without nesting IF statements.
Checked first. The first condition that is TRUE wins, so start with the most restrictive.
Returned when the first condition is true. Text needs quotes.
Only reached when the first condition is false.
Returned when the second condition is true. Text needs quotes.
Only reached when the first two conditions are false.
Returned when the third condition is true. Text needs quotes.
Paired with a final TRUE test so anything that matched nothing lands here instead of returning #N/A.
=IFS(A2>=90, "A", A2>=80, "B", A2>=70, "C", TRUE, "F")Worked Example
Turn a test score in A2 into a letter grade with a fallback for anything below 70.
=IFS(A2>=90, "A", A2>=80, "B", A2>=70, "C", TRUE, "F")Returns: A score of 84 returns "B"; 95 returns "A"; 62 falls through to the TRUE catch-all and returns "F".
Checks Before You Paste
- •IFS has no built-in else argument. The final TRUE in this formula is the standard workaround: TRUE always evaluates as true, so its result is returned whenever nothing above matched. Remove it and unmatched rows return #N/A.
- •IFS stops at the first condition that is TRUE, so order is everything. Listing A2>=70 before A2>=90 would label a score of 95 as "C", because 95 satisfies the >=70 test first.
- •Arguments always come in test/result pairs. Unlike SWITCH, IFS has no lone trailing default slot, which is why the catch-all above is written as the pair TRUE, result. Leave an odd argument over anywhere and Excel answers with "You've entered too few arguments for this function", which almost always means a missing result rather than a missing test.