IFS
Check multiple conditions at once and return the value for the first one that's true.
Spreadsheet editor
Spreadsheet editor
Syntax
=IFS(logical_test1, value_if_true1, [logical_test2, value_if_true2, ...], [default_value])
Returns: Varies Arguments
| Argument | Required | Description |
|---|---|---|
| logical_test1 | Yes | logical_test2, ..., The logical tests or conditions to evaluate. |
| value_if_true1 | Yes | value_if_true2, ..., The values to return if the corresponding logical test is true. |
| default_value | Yes | (Optional) The value to return if none of the logical tests are true. If omitted and no logical test is true, Excel will return a #N/A error. |
About
Use IFS any time you need to assign a label, tier, or result based on a ranked set of rules. Grading scales, sales commission bands, performance categories, and inventory status checks are all good fits. Order your conditions from most specific to least specific, since IFS stops at the first match.
To cover leftover cases, add TRUE as your final condition with a default value. Without it, IFS returns #N/A when nothing matches. If you need to handle errors in the result, wrap the formula with IFERROR.
Exercises using IFS
Examples
What happens without a TRUE fallback
Spreadsheet editor
Why condition order matters
Spreadsheet editor
Combining IFS with AND for two-variable decisions
Spreadsheet editor
Watch out for
No fallback for unmatched conditions
IFS returns #N/A when none of its conditions are TRUE. This can happen when an unexpected edge case slips through.
→ Add TRUE as the final condition with a default value, such as =IFS(..., TRUE, "Other"). This guarantees IFS always returns something.
Conditions in the wrong order
IFS stops at the first TRUE condition. If you put a broad condition like B2>=60 before a narrower one like B2>=90, high scores will match the wrong bucket first.
→ Always order conditions from highest to lowest (or most specific to least specific) so narrower rules get checked first.
Conditions that don't return TRUE or FALSE
If a condition evaluates to something other than TRUE or FALSE (for example, a number or text string), IFS returns a #VALUE! error.
→ Use comparison operators (>, <, =, >=, <=, <>) in the condition to produce a TRUE or FALSE result.