FxFormula Drills

IFS vs nested IF

Use IFS when the workbook is Excel 2019 or later, Microsoft 365, or Google Sheets and you have several mutually exclusive results. It is a list of tests and values, and the first true test wins. Use a nested IF when the file must open in Excel 2016 or earlier, or when you are already comfortable with two levels. End IFS with a TRUE pair if you need an else. Without it, no match returns #N/A.

Syntax

IFS

IFS(logical_test1, value1, [logical_test2, value2], ...)

Tests run left to right. The value next to the first true test is the result. There is no dedicated else argument. TRUE as a last test is always true, so its value is the fallback.

Nested IF

IF(test1, value1, IF(test2, value2, else_value))

The else of each IF is either a final value or another IF. You always supply that final value, so a nested IF does not fall off the end the way IFS can.

Comparison

QuestionIFSNested IF
LayoutPairs in one functionIF inside the false branch of another IF
ElseOptional TRUE pairRequired final value
No test succeeded#N/A if you did not add TRUEThe final value
OrderFirst true pair wins, so test the top band firstSame rule
Excel 2016#NAME?Works
Google SheetsWorksWorks

Worked examples

Shipping tier

100 or more ships Express. 50 or more ships Priority. Anything smaller ships Ground. Test the high cutoff first in both formulas. Orders are 120, 50, 49, and 100.

Four order amounts.
RowA
1Order
2120
350
449
5100
  • =IFS(A2>=100,"Express",A2>=50,"Priority",TRUE,"Ground") → Express
  • =IFS(A3>=100,"Express",A3>=50,"Priority",TRUE,"Ground") → Priority
  • =IFS(A4>=100,"Express",A4>=50,"Priority",TRUE,"Ground") → Ground
  • =IFS(A5>=100,"Express",A5>=50,"Priority",TRUE,"Ground") → Express
  • =IF(A4>=100,"Express",IF(A4>=50,"Priority","Ground")) → Ground
  • =IF(A2>=100,"Express",IF(A2>=50,"Priority","Ground")) → Express

120 and 100 hit the first test and return Express. 50 fails the first test and passes the second, so it is Priority. 49 fails both numeric tests. IFS reaches TRUE and returns Ground. The nested IF reaches its innermost else and also returns Ground. 100 is Express, not Priority, only because the 100 test is first. Reversing the tests would label 100 as Priority.

IFS with no fallback

If you leave off the TRUE pair and the amount meets neither cutoff, IFS does not invent an else.

49 is below both cutoffs, and this formula has no TRUE pair.
RowA
1Order
2120
350
449
5100
  • =IFS(A4>=100,"Express",A4>=50,"Priority") → #N/A

49 is not at least 100 and not at least 50. IFS has nothing left to return, so the result is #N/A. The nested IF cannot end that way if you gave it a final value. Add TRUE, "Ground" when Ground is the real policy, or wrap the IFS in IFNA if #N/A is a signal you want to relabel.

When to use which

Use IFS for a list of bands in a current file

Shipping, tax brackets expressed as successive tests, or status labels. The shipping drill grades IFS with the TRUE fallback. Readers can see each cutoff without matching parentheses.

Use nested IF for compatibility or for two levels

Excel 2016 and earlier run the nested form and do not run IFS. Two levels are still readable. The grade drill uses that form.

Use a lookup table when the bands change often

A sorted table of minimums and labels, read with VLOOKUP and TRUE or with XLOOKUP match_mode -1, lets someone edit a cutoff without editing a formula. The commission example on the VLOOKUP practice page is that pattern.

Common mistakes

Leaving off the TRUE pair

The 49 order becomes #N/A. If Ground is the policy for everything else, the TRUE pair is part of the formula, not an optional comment.

Testing the lower band first

IFS(A2>=50, "Priority", A2>=100, "Express", TRUE, "Ground") returns Priority for 120, because 120 is at least 50 and the Express test never runs.

Mixing up value and test

IFS takes test, value, test, value. Swapping a pair makes the value get used as a logical test. Keep the cutoff on the left of each pair and the label on the right.

Using IFS for AND

IFS picks one result. It does not require two facts before a single bonus. That is AND inside IF.

Versions and compatibility

IFS is in Excel 2019, Excel 2021, Excel 2024, Microsoft 365, and Google Sheets. It is not in Excel 2016. A workbook that must open there should use nested IF or a lookup table.

Nested IF is in all of those versions and in older Excel.

The #N/A from an IFS with no true test is the same code Google Sheets returns.

Practice on Formula Drills

Free drills are open with no account. Premium drills show the problem to everyone and grade the sheet for subscribers.

Free exercises

Premium exercises

Function pages

FAQ

Is IFS faster to calculate than nested IF?

Not in any way that matters for a shipping tier. Choose IFS for the flat list, and nested IF when you need older Excel or you only have two outcomes.

Can the last IFS test be something other than TRUE?

Yes, if you truly have no leftover case. Then a value that matches nothing returns #N/A, which the second example shows. Use that only when an unmatched input should look like an error.

How do I convert a nested IF to IFS?

Read each IF's test and true result as a pair, from the outside in. The innermost else becomes TRUE and that value. Keep the same order.

Does IFS short-circuit?

Later pairs are not used once an earlier test is true, in the sense that their result is not returned. Still write later tests so they would be valid formulas. Do not depend on a later pair containing an error that you hope will never be evaluated.