Back to functions
Logical2026-03-181 related article

IFS Function in Excel

Evaluate multiple conditions and return the result for the first TRUE condition.

Syntax

IFS(logical_test1, value_if_true1, [logical_test2, value_if_true2], ...)

Arguments

logical_test1

Required

The first condition to evaluate.

value_if_true1

Required

The value returned when logical_test1 is TRUE.

logical_test2

Optional

An additional condition to evaluate if previous tests were FALSE.

value_if_true2

Optional

The value returned when logical_test2 is TRUE.

What it returns

Returns the value associated with the first condition that evaluates to TRUE.

What IFS does

IFS checks multiple conditions in order and returns the value for the first condition that is TRUE. It replaces nested IF formulas and makes multi-branch logic easier to read.

If no condition is TRUE, IFS returns a #N/A error. To avoid this, add TRUE as the last condition with a default value.

Practical examples

Assign a size label based on a value

=IFS(A2<10,"XS",A2<20,"S",A2<30,"M",A2<40,"L",TRUE,"XL")

Each condition is tested in order. The first match wins. The final TRUE acts as a catch-all default.

Grade a score

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

This is cleaner than five levels of nested IF and easier to extend when new grade thresholds are added.

Common mistakes and notes

Missing default condition

Without a TRUE catch-all at the end, rows that match no condition will return #N/A. Always include a default unless you specifically want an error for unmatched cases.

Condition order matters

IFS returns the value for the first TRUE condition. If you put A2<40 before A2<10, everything under 40 matches the first test and the smaller thresholds never run.

Availability

IFS is available in Excel 365, Excel 2021, and Excel 2019. It is not available in Excel 2016 or earlier.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use IFS.

Official documentation