ExcelReady
CourseFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before the interview. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Function guides
  • Blog

Product

  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Logic
  3. The Excel IFS Function: Cleaner Than Nested IFs

The Excel IFS Function: Cleaner Than Nested IFs

By ExcelReady Team·Updated October 30, 2026·6 min read

The short answer

The Excel IFS function checks a list of conditions in order and returns the result paired with the first TRUE one: =IFS(test1, value1, test2, value2, ...). It replaces nested IFs without the brackets. IFS has no "otherwise" result, so end with TRUE and a fallback value. It needs Excel 2019 or later.

Key takeaways

  • IFS takes pairs: a test, then the value to return when that test is TRUE.
  • Excel stops at the first TRUE test, so order the tests from the highest band down or the lowest band up.
  • If no test is TRUE, IFS returns #N/A; a final TRUE pair works as the 'otherwise' result.
  • IFS needs Excel 2019, Excel 2021 or Microsoft 365; older versions show #NAME?.
On this page+
  1. How does the Excel IFS function work?
  2. Why end IFS with TRUE?
  3. How to write an IFS formula for price bands
  4. Can IFS return a calculation?
  5. Should you use IFS or SWITCH?
  6. Which versions of Excel have IFS?
  7. What are the common IFS mistakes?
  8. Practise it

The Excel IFS function does the job of a nested IF without the nesting. You give it a list of tests and results, and it returns the result for the first test that is TRUE. It's ideal for grades, price bands and status labels. This guide covers the syntax, the one trick every IFS formula needs, and which Excel versions support it.

How does the Excel IFS function work?#

IFS checks each test in order and returns the value paired with the first TRUE test. The syntax is:

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

Arguments come in pairs: a test, then the value to show when that test is TRUE. You can have up to 127 pairs. As soon as one test is TRUE, Excel stops and ignores the rest.

Compare the same grade formula written both ways:

Excel formula
=IF(B2>=90,"A",IF(B2>=80,"B",IF(B2>=70,"C","F")))
=IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",TRUE,"F")

Both return the same grades. The IFS version is one flat list, with one pair of brackets, so it's easier to read and harder to break. For the full trade-off, see the nested IF vs IFS comparison.

Why end IFS with TRUE?#

IFS has no "otherwise" result. If none of the tests is TRUE, it returns #N/A. The fix is a last pair whose test is simply TRUE:

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

TRUE always passes, so any score that reaches it gets "F". Type TRUE without quotes: it is a logical value, not text. You will see this pattern in almost every IFS formula, and it's a common job-test question.

StudentScoreWithout the TRUE pairWith TRUE,"F"
Ana94AA
Dev78CC
Cara67#N/AF
Fay55#N/AF

How to write an IFS formula for price bands#

Write the pairs in order, from the highest band down with >=, or from the lowest band up with <=. Here is a shipping table that starts with the lightest parcels:

Excel formula
=IFS(B2<=1,4.5,B2<=5,7.95,B2<=20,12,TRUE,"Quote")
OrderWeight (kg)ShippingWhy
SO-22010.84.5Passes the first test
SO-22023.27.95Fails <=1, passes <=5
SO-22031212Passes <=20
SO-220425QuoteFails all three, so TRUE catches it
SO-220557.95Exactly 5, and <= includes it

To build it yourself:

  1. Click C2 and type =IFS(.
  2. Type the first pair: the test B2<=1, a comma, the result 4.5, a comma.
  3. Add the next pairs the same way: B2<=5,7.95, then B2<=20,12,.
  4. Finish with TRUE,"Quote") and press Enter.
  5. Fill down with Ctrl+D (Windows) or ⌘D (Mac).

Order still matters. If B2<=20 came first, every parcel up to 20 kg would cost 12, because Excel stops at the first TRUE test. IFS is cleaner than nested IF, but it doesn't fix tests in the wrong order.

This column mixes numbers and text. That's fine for reading, but remember that SUM skips text: a total of column C leaves out the "Quote" rows rather than warning you about them. For more on <=, >= and the other signs, read the guide to Excel comparison operators.

Can IFS return a calculation?#

Yes. A value can be a number, text, a cell reference or a calculation. This one works out commission in one step by multiplying the sales by the rate IFS picks:

Excel formula
=B2*IFS(B2>=100000,0.08,B2>=60000,0.05,B2>=30000,0.03,TRUE,0)

For sales of 61000, the rate is 0.05, so the result is 3050. Keep the TRUE,0 pair: without it, sales under 30000 give #N/A, and #N/A times anything is still #N/A.

You can also use AND or OR as a test inside IFS, for example =IFS(AND(C2>=50000,D2>=4.5),"Top",C2>=50000,"Good",TRUE,"Coach"). See AND, OR and NOT in Excel for how those tests work.

Should you use IFS or SWITCH?#

Use IFS when the tests are ranges or different conditions, and SWITCH when you match one value against exact options. Both need Excel 2019 or later.

IFSSWITCH
Best forBands and ranges: >=90, <=5Exact codes: "P", "S", "D"
Each pairA test, then a resultA value to match, then a result
"Otherwise" resultNeeds a final TRUE, pairA single value at the end
No match and no fallback#N/A#N/A

So grades and price bands suit IFS, and turning status codes into labels suits SWITCH. Read the SWITCH function guide for examples.

Which versions of Excel have IFS?#

IFS is available in Excel 2019, Excel 2021, Excel 2024, Microsoft 365 (Windows and Mac) and Excel for the web. Excel 2016 bought as a one-time purchase, and earlier versions, don't have it.

If you open a file that uses IFS in an older version, the cell shows #NAME? after it recalculates, and the formula appears with an _xlfn. prefix. If your file goes to people on older Excel, or a job test runs on an older install, use a nested IF instead. It works everywhere.

What are the common IFS mistakes?#

These cause most IFS problems:

MistakeWhat you seeFix
No TRUE pair at the end#N/A for some rowsAdd TRUE, and a fallback
A lone fallback: ...,B2>=70,"C","F")Excel won't accept the formulaWrite TRUE,"F", not just "F"
Tests in the wrong orderValues land in the wrong bandHighest first with >=, or lowest first with <=
Older Excel version#NAME?Use nested IF

The second row catches people who know SWITCH, which does accept a lone default value at the end. IFS doesn't: every argument must be part of a pair.

Also be careful about what IFS can't catch. If B2 holds an error, such as #DIV/0!, IFS passes that error on. Fix the source if you can, or handle it deliberately with IFERROR, used the right way.

For every argument in one place, see the IFS function guide.

Practise it#

Try the shipping exercise on this page, then practise IFS and nested IF in a live spreadsheet. The lesson builds grades with both functions, shows the #N/A you get without the TRUE pair, and finishes with a commission formula.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Shipping costs 4.5 for parcels up to 1 kg, 7.95 up to 5 kg and 12 up to 20 kg. Anything heavier needs a quote. In C2, use IFS on the weight in B2 to return the cost, testing the lightest band first with <=. End with a TRUE,"Quote" pair.

fx
ABCD
1
Order
Weight (kg)
Shipping
2
SO-2201
0.8
3
SO-2202
3.2
4
SO-2203
12
5
SO-2204
25
6
SO-2205
5
7
SO-2206
1
8
9
10

Tip: Write the pairs from the lightest band up: B2<=1 with 4.5, then B2<=5 with 7.95, and so on. Numbers need no quotes.

Practise this in a lesson

LessonNested IF and IFSHandle more than two outcomes, like letter grades or commission bands, with nested IFs or the cleaner IFS.Function guideIFSReplace messy nested IFs with Excel's IFS function. Examples for grades, tiers and SLAs, the catch-all trick, and a live exercise.

Frequently asked questions

What is the difference between IF and IFS in Excel?

+

IF tests one condition and returns one of two results. IFS tests several conditions in order and returns the result for the first TRUE one, so it replaces a chain of nested IFs.

How do I add an 'else' to IFS?

+

Add TRUE as the last test, followed by the fallback value, like ...,TRUE,"F"). TRUE always passes, so it catches every value that failed the earlier tests.

Why does IFS return #N/A?

+

None of the tests was TRUE for that row, and IFS has no built-in default. Add a final TRUE pair with a fallback value.

Which Excel versions have the IFS function?

+

IFS is in Excel 2019, Excel 2021, Excel 2024, Microsoft 365 and Excel for the web. Excel 2016 bought outright and earlier versions don't have it and show #NAME?.

Can IFS use AND or OR?

+

Yes. Any test can be an AND or OR, like =IFS(AND(B2>=50000,C2>=4.5),"Top",B2>=50000,"Good",TRUE,"Coach").

Sources

  • IFS function - Microsoft Support
  • IF function - Microsoft Support

Written and checked by the ExcelReady Team. First published October 30, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How does the Excel IFS function work?
  2. Why end IFS with TRUE?
  3. How to write an IFS formula for price bands
  4. Can IFS return a calculation?
  5. Should you use IFS or SWITCH?
  6. Which versions of Excel have IFS?
  7. What are the common IFS mistakes?
  8. Practise it

Keep reading

Logic· 7 min read

AND, OR and NOT in Excel With IF

AND returns TRUE only when every condition is TRUE. OR returns TRUE when at least one condition is TRUE. NOT flips TRUE to FALSE and FALSE to TRUE. On their own they give TRUE or FALSE, so you usually put them inside IF's test, like =IF(AND(C2>=50000,D2>=4.5),"Bonus","No bonus").

Logic· 6 min read

IFERROR in Excel: Hide Errors the Right Way

IFERROR returns a formula's normal result, or a value you choose if the formula gives an error: =IFERROR(value, value_if_error). For example, =IFERROR(B2/C2,0) shows 0 instead of #DIV/0!. It catches every error type, including mistakes in your own formula, so check the formula works first, and use IFNA for lookups.

Logic· 6 min read

Excel Comparison Operators: =, <>, >, <, >=, <=

In Excel, "not equal to" is written <>, so =A2<>"Delivered" returns TRUE when A2 is anything other than Delivered. Excel has six comparison operators: = equal, <> not equal, > greater than, < less than, >= greater than or equal, and <= less than or equal. Each returns TRUE or FALSE.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback. The first lessons are free, with no download.

Start learning for free