Excel IFS Function: Syntax, Examples, and Alternatives

Formulas & functions · Updated November 18, 2026

In Microsoft Excel, the IFS function checks multiple conditions in order and returns the result paired with the first condition that is TRUE. It is a convenient alternative to stacking several IF functions, but if no condition is true and you have not supplied a fallback, IFS returns #N/A.

What the IFS function does

IFS is a logical function for choosing an output from a set of possible outcomes. You provide a test, the value to return if that test is true, another test and its value, and so on. Excel checks the tests from left to right. As soon as one is true, it returns the paired value and stops looking for a match.

This makes IFS useful when a result depends on several categories or thresholds, such as assigning letter grades, applying discount bands, or labeling a service response as on time, delayed, or overdue. The outputs do not have to be text: a result can be a number, a date, a cell reference, or another expression Excel can evaluate.

IFS does not mean “if all these conditions are true.” It selects the first true test. If a single outcome requires multiple requirements to be met together, combine those requirements in a logical test with AND. If any one of several requirements is enough, OR may be appropriate. The key distinction is that IFS chooses among outcomes, while AND and OR combine conditions.

IFS syntax and arguments

An IFS formula takes pairs of arguments: each logical test is followed by the value to return when that test is true. The pairs can be repeated for multiple cases. In Excel’s standard syntax, separate arguments with commas; some regional settings display semicolons instead.

For example, with a test score in B2, this formula assigns a grade. The layout assumed is a numeric score in B2; for a score of 84, the result is B.

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

The first pair asks whether B2 is at least 90. If it is not, Excel checks whether it is at least 80, and continues until a test matches. The final TRUE acts as a catch-all: because TRUE is always true, Excel returns F if none of the earlier tests matched. This is often the clearest way to make a formula handle every remaining case.

Each test must have a corresponding result, and the arguments must stay in pairs. For instance, a missing result after a test can make the formula invalid. Also, put text outputs inside straight double quotation marks, as in “A”. A text value that refers to a cell should not be quoted: use the cell reference if you want Excel to return the value stored there.

A worked example: grades and thresholds

Threshold-based formulas are a natural use for IFS. With the score in B2, the grade example above gives 84 a B because the first true test is B2>=80. A score of 95 returns A, while 72 returns C. The final TRUE ensures that a valid numeric score below 60 receives F rather than an error.

The same pattern can represent a discount schedule. Suppose the order total is in C2 and the policy is 10% off at 1,000 or more, 5% off at 500 or more, and no discount below 500. With the order total in C2, a value of 650 returns 0.05, which can be displayed as 5% by formatting the result cell as a percentage.

=IFS(C2>=1000,0.10,C2>=500,0.05,TRUE,0)

Notice that this formula returns the discount rate, not the discounted price. To calculate the price after discount, use a separate calculation or include that calculation as the returned value. Keeping the classification and the arithmetic separate can make a workbook easier to audit, especially when the policy changes.

Put conditions in the right order

Order matters whenever tests overlap. In the discount example, an order total of 1,200 is also at least 500. Because the 1,000 test comes first, Excel returns 10%, as intended. If the 500 test came first, Excel would stop there and return only 5%. The more specific or higher-priority condition generally belongs before a broader condition.

For ranges, arrange thresholds so each boundary leads to the intended category. In the grade example, checking from highest score downward works because each test uses “greater than or equal to.” After a score fails the 90 test, it can still match the 80 test. The fallback then covers everything below the listed thresholds.

Before relying on an IFS formula, test values at the boundaries as well as typical values. For grade bands, try 59, 60, 69, 70, 79, 80, 89, 90, and a value above 90. This reveals gaps, accidental overlaps, and wrong comparison operators such as > where >= was intended. Also test blank cells and any unexpected text that users might enter.

How to handle cases with no match

Unlike IF, IFS has no separate “otherwise” argument built into the end of its syntax. If every test evaluates to FALSE, Excel returns #N/A. Adding a final TRUE and its result is a common way to define the default outcome, whether that is “Other”, 0, or a status such as “Review”.

For input cells that may be blank, decide explicitly what a blank should mean. With a score in B2, this version returns an empty string for a blank cell, assigns grades to the stated ranges, and returns F for any other numeric score below 60.

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

An empty string result looks blank in the worksheet, but the cell still contains a formula. That can matter in later calculations and checks. If blanks should be treated as missing data rather than as a grade, consider making that explicit with a message such as “Enter a score” instead. If users can enter text where a number is expected, add a suitable validation or error-handling strategy rather than assuming every nonblank entry is numeric.

IFS compared with IF, SWITCH, AND, and OR

IFS is often easier to read than nested IF when there are several unrelated tests, because the tests and their returned values appear as a sequence of pairs. Nested IF is still useful when a workbook must work in an older Excel version that does not support IFS, or when a particular branch needs its own more complex decision structure.

For a score in B2, this nested IF formula has the same grade thresholds and also gives 84 the result B. It is a direct alternative, though adding many more grades makes the nesting harder to scan.

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

SWITCH can be a better fit when one expression is compared against a list of exact values, such as mapping a short code to a region. It is less suited to ranges such as “at least 80,” which are straightforward in IFS. With a region code in A2, the following formula returns South when A2 contains S and Unknown for any other value.

=SWITCH(A2,"N","North","S","South","E","East","W","West","Unknown")

Use AND inside an IFS test when a particular outcome depends on several requirements being true together. Use OR when either of several alternatives should qualify. For example, a rule might require both a score threshold and a completed status; IFS can then choose between that outcome and other cases. These functions can be combined, but keep the criteria readable and test each meaningful path.

Common IFS problems and troubleshooting

  • #N/A: No test matched. Add a final TRUE fallback or check whether the tests cover the values you expect.
  • #NAME?: The Excel version may not recognize IFS, or the function name may be misspelled. Check version support and the formula spelling.
  • Unexpected category: A broader test may appear before a more specific one. Reorder the pairs and test overlapping values.
  • Wrong result near a boundary: Confirm whether the rule needs >, >=, <, or <=. A single equality difference changes which side includes the boundary.
  • Formula entry error: Check that every test has a result, text is enclosed in straight double quotes, and your Excel settings use the separator entered in the formula.

Excel comparisons between text and numbers can also produce results that are not what a user expects. If a score column contains entries such as “80 points” as text, a numeric threshold test is not equivalent to testing the number 80. Store numeric data as numbers, and use data validation or a clear input process to reduce inconsistent entries. IFS returns the result of the first matching test; it does not clean or repair the source values.

Availability and compatibility

IFS is available in Microsoft 365 and Excel 2019 or later, including Excel 2021 and Excel 2024. It is also available in Excel for the web. The formula logic is essentially the same in current Windows and Mac versions; the available function depends on the Excel version, not just the operating system. Excel 2016 and earlier do not include IFS, so a workbook using it may not calculate correctly on those installations. Use nested IF or an appropriate lookup-based design when compatibility with older releases is required.

If a workbook is shared across computers with different regional settings, argument separators can differ: one installation may expect commas and another semicolons. This is a locale setting, not a different IFS function. Excel may adjust separators when a workbook is opened, but if a formula is rejected, check the separator convention in that installation. For broader maintenance, document the intended Excel version and the meaning of each threshold near the data or in a notes sheet.

Frequently Asked Questions

What does IFS mean in Excel?
IFS is a logical function that tests conditions in order and returns the value associated with the first condition that is TRUE. It is designed to express multiple branches without repeatedly nesting IF functions.

What happens if no IFS condition is true?
Excel returns #N/A when all the supplied tests are false. Add a final TRUE test with a default result if you want the formula to return something else.

Can I use IFS for ranges?
Yes. Use comparisons such as greater than or equal to, and order the tests so overlapping ranges resolve correctly. Check boundary values to confirm that each value belongs to the category you intended.

Is IFS better than nested IF?
For several straightforward conditions, IFS is often easier to read. Nested IF may be necessary for compatibility with older Excel versions, and it can be suitable when branches have distinct nested logic. Choose the structure that is clearest for the people who will maintain the workbook.

Why does Excel show #NAME? for IFS?
The workbook may be open in an Excel version that does not support IFS, or the formula may contain a spelling or separator issue. IFS requires Excel 2019 or later, or Microsoft 365; on older versions, use nested IF or another compatible design.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.