Excel’s IFS function checks conditions in order and returns the result for the first one that is true.

These examples show how to use it for grades, sales bands, status labels, and other multi-condition rules—and how to avoid common errors.

How the IFS function works

IFS pairs logical tests with the values to return when those tests are true.

Its syntax is:

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

Each test must be followed by a corresponding result.

Excel evaluates the pairs from left to right, stopping at the first true test.

If no test is true and you have not included a fallback condition, IFS returns #N/A.

For example, suppose cell A2 contains a score from 0 to 100.

This formula assigns a letter grade:

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

If A2 contains 84, Excel returns B.

The order matters: a score of 95 also meets the condition A2>=80, so the highest threshold must come first.

Otherwise, Excel could return a lower grade before checking the more specific condition.

Excel IFS function examples for everyday tasks

Assign a status based on a numeric range

Suppose B2 contains the number of days an invoice is overdue.

Use:

=IFS(B2=0,"Current",B2<=30,"1–30 days",B2<=60,"31–60 days",B2>60,"Over 60 days")

Expected results include 0 returning Current, 18 returning 1–30 days, and 45 returning 31–60 days.

The first condition handles zero separately; the later tests cover successively larger values.

Apply a commission rate to sales

If C2 contains a salesperson’s total sales, this formula returns a commission rate:

=IFS(C2>=50000,10%,C2>=25000,7%,C2>=10000,5%,C2<10000,2%)

With sales of 32,000, the result is 7%.

This formula returns the rate only; to calculate the commission amount, multiply the sales by the result, or put the complete calculation into each return value.

For example, =IFS(C2>=50000,C2*10%,C2>=25000,C2*7%,C2>=10000,C2*5%,C2<10000,C2*2%) returns the commission amount.

Label a date as past due or upcoming

Suppose D2 contains a due date.

Use:

=IFS(D2<TODAY(),"Past due",D2=TODAY(),"Due today",D2>TODAY(),"Upcoming")

A date before today returns Past due, while today returns Due today.

Because TODAY() changes with the current date, the displayed status can change when the workbook recalculates.

Blank cells need separate handling if they should not be classified as past due.

Return a result for text categories

If E2 contains a department name, you can map it to a short label:

=IFS(E2="Sales","Commercial",E2="Support","Customer care",E2="Finance","Operations",TRUE,"Other")

For example, Support returns Customer care, and an unlisted department returns Other.

In Excel’s standard comparisons, text matching is not case-sensitive, so sales matches Sales.

Extra spaces, such as Sales , can still prevent a match.

Use a final condition to prevent #N/A

IFS does not automatically return a blank or default value when every test is false.

A reliable pattern is to end the formula with TRUE and its fallback result:

=IFS(A2>=90,"A",A2>=80,"B",A2>=70,"C",TRUE,"Below C")

Since TRUE is always true, Excel returns Below C whenever none of the earlier conditions match.

This also makes it possible to handle values outside an expected range without an error.

For a blank result, use TRUE,"".

For an explanatory label, use something like TRUE,"Check input".

Choose a fallback that makes sense for the worksheet: a blank can look tidy, while a visible message makes unexpected data easier to spot.

Common IFS errors and edge cases

  • Missing result-value pairs: Every logical test needs a value to return.

    Check that the formula contains an even number of arguments.
  • No condition matches: Without a final fallback, unmatched values produce #N/A.

    Add TRUE and a default result.
  • Conditions are in the wrong order: Overlapping tests should usually be arranged from most restrictive or highest threshold to least restrictive.

    A broad test can otherwise catch a value too early.
  • Blank cells meet an unintended test: A blank may behave like zero in some numeric comparisons.

    Add an initial check such as A2="" if blanks need their own result.
  • Values have the wrong type: Numbers stored as text, unexpected spaces, or dates entered as text can lead to surprising comparisons.

    Check the source data and normalize it when needed.
  • Too many nested rules: A long IFS formula can become difficult to review.

    For a large or frequently changing mapping, a lookup table with XLOOKUP or another lookup function may be easier to maintain.

IFS compatibility and alternatives

IFS is available in Excel 2019 and later, including Excel 2021, Excel 2024, and Microsoft 365.

It is also available in Excel for the web and Excel mobile.

Excel 2016 and earlier do not support IFS; opening a workbook with the function in those versions can produce a _xlfn.IFS prefix or an unsupported-function error.

For older Excel versions, use nested IF functions.

For example, the grade rule can be written as:

=IF(A2>=90,"A",IF(A2>=80,"B",IF(A2>=70,"C",IF(A2>=60,"D","F"))))

Google Sheets also supports IFS with the same general condition-and-result pattern.

Spreadsheet locales can use different argument separators, so a formula that uses commas may require semicolons in another locale.

If Excel reports a formula syntax error, check the regional list separator as well as quotation marks and parentheses.

When should you use IFS instead of nested IF?

Use IFS when you have several mutually exclusive outcomes and want to keep each test paired with its result in a readable sequence.

It is especially useful for thresholds, category labels, and status rules.

Use nested IF when you need broad compatibility with older Excel versions, or consider a lookup table when rules are numerous or maintained by several people.

Before filling a formula down a column, check boundary values as well as typical ones.

For score bands, test values such as 59, 60, 69, 70, 79, 80, and 90 to confirm that every threshold maps to the intended result.