Templates, guides & honest tool reviews for small business

Sunday, November 29, 2026

IFS Function in Excel: Test Several Conditions Without Nested IF

IFS function in Excel with examples
Illustration: IFS function in Excel

The IFS function in Excel tests several conditions in order and returns the result for the first one that is true. The syntax is =IFS(test1, result1, test2, result2, ...). It is a cleaner way to write what used to need a nested IF formula. IFS is available in Excel 2019 and Excel 365. It is not in Excel 2016 or earlier. The sample data is made up.

IFS syntax

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

Each test is paired with the result to return if that test is true. Excel goes through the pairs from left to right and stops at the first true test.

IFS function syntax in Excel
Test and result pairs (illustration).

A grade example

With scores in B2:

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

A score of 85 fails the first test, passes the second, and returns "B". The final pair, TRUE, "F", works as a catch-all. IFS has no default argument like SWITCH, so without it a score of 50 returns the #N/A error.

IFS grade example with a TRUE catch-all in Excel
Made-up scores (illustration).

Order matters

Because Excel stops at the first true test, put the strictest test first. If you put B2>=60 first, every score of 60 or more returns "D". Check the order if the results look wrong.

The order of tests matters in the Excel IFS function
Strictest test first (illustration).

IFS with AND and OR

Each test can use AND or OR. Example: bonus level by sales and region:

=IFS(AND(B2>=1000, C2="East"), "Gold", B2>=1000, "Silver", TRUE, "None")

The pattern is explained in our guide to the IF formula with AND and OR.

IFS compared with nested IF

The same grade formula with nested IF needs four levels of brackets. IFS is shorter and easier to read, and it avoids the bracket count errors. The older style is shown in our nested IF guide. For a single cell tested against exact values, SWITCH is shorter still.

Text results and numbers in quotes

Text results must be in double quotes, as in "Pass". Numbers do not need quotes. A number in quotes becomes text, which can break later sums.

Fix common errors

  • #N/A. No test was true. Add a final TRUE, "value" pair.
  • "You've entered too few arguments." A test has no result after it. Count the pairs.
  • #NAME? Your version of Excel does not have IFS, or the name is misspelled.
  • Wrong result. The tests are in the wrong order.
  • Blank cell treated as 0. An empty cell counts as 0 in a comparison. Test for a blank first with B2="", "".
Fix IFS errors in Excel
Common causes (illustration).

Questions and answers

How many conditions can IFS handle?

Microsoft documents up to 127 pairs of tests and results.

Does IFS work in Google Sheets?

Yes. Google Sheets has IFS with the same arguments. See our guide to IF with multiple conditions in Google Sheets.

Can I use IFS with text?

Yes. For example =IFS(A2="Red", 1, A2="Blue", 2, TRUE, 0).

What should I use in Excel 2016?

Use nested IF, or a lookup table with approximate match, which is also better when the list is long.

العربية