Logical · Nested IF replacement

IFS

Multiple conditions, one clean formula. IFS evaluates conditions in order and returns the value for the first TRUE condition — no more nightmarish nested IF pyramids with unbalanced parentheses.

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

Tests up to 127 condition/value pairs sequentially. Returns the value paired with the first TRUE condition. Cleaner and more maintainable than nested IF for 3+ tiers.

Category
Logical
Returns
Value from matched pair
Available since
Excel 2019

What IFS does

IFS is Microsoft's official cleanup of the nested-IF problem. Before IFS, categorizing a value across 4+ tiers meant writing =IF(x>90,"A",IF(x>80,"B",IF(x>70,"C",IF(x>60,"D","F")))) — a parenthesis-counting nightmare that anyone maintaining the workbook has to mentally unwind. IFS turns that into a flat sequence of condition-value pairs that reads top-to-bottom like a simple lookup table.

The function evaluates conditions in order and stops at the first TRUE. Order matters — put the most restrictive condition first. If none of the conditions match, IFS returns #N/A, so most real-world uses include a final "catch-all" condition of TRUE paired with the default value.

💡 The catch-all trick

IFS doesn't have a built-in "else" argument like some programming languages. To create a default value when nothing matches, add a final pair: TRUE, "default value". Since TRUE is always TRUE, this pair only fires when every prior condition was false — effectively becoming your else branch.

Syntax breakdown

IFS takes pairs of arguments: a logical test followed by the value to return if that test is TRUE. You can pass up to 127 pairs.

logical_test1Required

The first condition to evaluate. Can be any comparison, function call, or boolean expression. Evaluated first — order matters.

value1Required

The value returned if logical_test1 is TRUE. Can be a number, text, date, cell reference, or another formula.

logical_test2, value2, ...Optional

Additional condition/value pairs, evaluated in sequence. IFS stops at the first TRUE. Common pattern: end with TRUE, "default" as the catch-all.

5 real-world examples

Example 1 · Grade brackets

Convert a score to a letter grade

Score in A2. Standard bracket: 90+ = A, 80+ = B, 70+ = C, 60+ = D, otherwise F.

=IFS(A2>=90,"A", A2>=80,"B", A2>=70,"C", A2>=60,"D", TRUE,"F")
Result: the correct letter grade based on the score

Note the final TRUE, "F" catch-all — without it, scores below 60 return #N/A instead of "F".

Example 2 · Commission tiers

Calculate salesperson commission by revenue bracket

Revenue in B2. Commission rates: $100K+ = 10%, $50K+ = 7%, $25K+ = 5%, otherwise 3%.

=IFS(B2>=100000,0.10, B2>=50000,0.07, B2>=25000,0.05, TRUE,0.03) * B2
Result: the actual commission amount (rate × revenue)

IFS returns just the rate; multiply outside the function to get the dollar amount.

Example 3 · Order status categorization

Categorize orders by days-since-order

Days-since-order in C2. Categorize as Overdue, At risk, On track, or Recent.

=IFS(C2>30,"Overdue", C2>14,"At risk", C2>7,"On track", TRUE,"Recent")
Result: the appropriate status label

Read top-to-bottom: over 30 = Overdue; if not, over 14 = At risk; if not, over 7 = On track; otherwise Recent.

Example 4 · Multi-column decision logic

Route requests based on two fields

Priority in D2, category in E2. Route to different teams based on combinations.

=IFS(AND(D2="High",E2="Tech"),"Escalate", D2="High","Manager", E2="Billing","Finance", TRUE,"Support")
Result: the correct routing based on priority + category combo

Each IFS condition can itself use AND, OR, or NOT to combine multiple checks.

Example 5 · Age group categorization

Assign age groups for demographic analysis

Age in F2. Groups: Under 18, 18-24, 25-34, 35-54, 55+.

=IFS(F2<18,"Under 18", F2<25,"18-24", F2<35,"25-34", F2<55,"35-54", TRUE,"55+")
Result: the age group label matching the exact age

Using < (less than) from smallest bracket up — equivalent logic to >= from largest down.

Common errors and how to fix them

#N/A

No condition matched and no catch-all

IFS returns #N/A when none of your conditions evaluate to TRUE and you didn't include a final TRUE, "default" pair.

Fix: add a catch-all as the last pair — TRUE, "your default value"
Wrong result

Conditions in wrong order

You wrote =IFS(A2>60,"Pass", A2>90,"Excellent"). Since IFS stops at the first TRUE, every score above 60 returns "Pass" — even 95.

Fix: order from most restrictive to least — put A2>90 first, then A2>60
#VALUE!

Odd number of arguments

You forgot a value for one of the conditions — IFS needs matched pairs. Every logical_test must have a paired value.

Fix: count your arguments — the total must be even. Look for missing values.
#NAME?

IFS not available in this Excel version

You're on Excel 2016 or earlier, which doesn't have IFS. The formula shows #NAME? because Excel doesn't recognize the function.

Fix: use nested IF for backward compatibility, or upgrade to Excel 2019+ / 365

See our Formula Errors guide for more.

IFS vs nested IF vs SWITCH

IFS Use when: multiple conditions with different comparisons (greater than, equals, contains). The cleanest option for tier logic. Excel 2019+.
Nested IF Use when: only 2-3 tiers, or you need backward compatibility with Excel 2016 and earlier. Read our IF guide.
SWITCH Use when: matching one value against a list of fixed possibilities. Cleaner than IFS when the comparison is always equality against the same variable.
Lookup table Use when: 6+ tiers or dynamic/user-editable brackets. Build a lookup table and use XLOOKUP or VLOOKUP with approximate match.

Version compatibility

Excel 365
✓ Full support
Excel 2021
✓ Full support
Excel 2019
✓ Full support
Excel 2016
✗ Not available
Excel Online
✓ Full support
Excel Mac
✓ Full support
Excel iPad
✓ Full support
Google Sheets
✓ Full support

Related functions

📥 Download the practice workbook

All 5 examples above in a working .xlsx file, plus a nested-IF vs IFS comparison exercise.

Workbook coming soon — check back after our team releases it.

Frequently asked questions

Is IFS just syntactic sugar for nested IF?

Functionally yes — anything IFS does, nested IF can do too. The value is readability and maintainability. A 5-tier IFS is easy to read and modify. A 5-level nested IF is a parenthesis-counting exercise.

How many conditions can IFS handle?

Up to 127 condition/value pairs. In practice, if you need more than 5-6 tiers, switch to a lookup table with XLOOKUP or VLOOKUP — the lookup table is easier to maintain than any long IFS.

Does the order of conditions matter?

Yes, critically. IFS stops at the first TRUE condition. If you write =IFS(x>60,"Pass", x>90,"Excellent"), the second condition never fires because scores above 90 already match the first. Order from most restrictive to least.

Can I use IFS without a catch-all?

You can, but IFS returns #N/A when no condition matches. Almost always safer to end with TRUE, "default" as the catch-all.

Should I convert all my nested IFs to IFS?

Not urgently. If a nested IF works and isn't broken, don't rewrite it just for style. Reserve IFS for new work and situations where you're already refactoring. The exception: if a nested IF is causing bugs (missing branches, wrong nesting), rewriting as IFS often reveals the error.

Can IFS return arrays or does it always return one value?

In Excel 365 with dynamic arrays, IFS can return an array if evaluated across a range. Wrap in ARRAYFORMULA in Google Sheets for equivalent behavior. Most business uses return a single value per cell.

How does IFS compare with SWITCH?

SWITCH is better when you're always comparing the same expression to different values (like SWITCH(A1, 1,"One", 2,"Two", 3,"Three")). IFS is better when the comparison itself changes between conditions (greater-than, less-than, contains, etc.).

Multi-tier logic without the headache.

Describe your logic — "if revenue over $100K then 10%, over $50K then 7%..." — and get the exact IFS formula ready to paste.

Get the Add-in →