Excel IFS Function: Formula, Examples, and Tips

Formulas & functions · Updated November 18, 2026

In Excel, the IFS function checks conditions in order and returns the value paired with the first condition that is TRUE. A typical formula is =IFS(A2>=90,"A",A2>=80,"B",TRUE,"Below B"); if A2 contains 85, it returns B. IFS is useful when several outcomes depend on different tests, because it avoids stacking many IF functions inside one another.

What the Excel IFS function does

IFS is a logical function for choosing among multiple results. You provide a condition, the result to return if that condition is true, another condition and its result, and so on. Excel tests the conditions from left to right. It stops at the first true condition and returns the value in the matching position; it does not test later conditions after that.

This makes IFS a good fit for rules such as assigning letter grades, applying a discount by order size, labeling a delivery status, or converting a numeric score into a category. It is most helpful when the outcomes form a readable sequence of rules. It does not, by itself, search a table or test whether a value matches one item among many; other functions can be a better choice for those jobs.

IFS is available in Microsoft 365 and Excel 2019 and later. If a workbook is opened in an older Excel version, the function may not be recognized. Excel for the web and current Mac versions support IFS as well, although the appearance of the ribbon differs from Excel for Windows. The function itself works the same way across these versions.

How to write an IFS formula

Build the formula from pairs: each logical test is followed by the value Excel should return when that test is true. A test can compare a cell with a number, text, a date, or another expression. The value can be text in quotation marks, a number, a cell reference, or a calculation. Keep each test beside its corresponding result so the pairs are easy to inspect.

For example, with a student’s score in A2, a grade formula can test the highest threshold first, then work downward. With 87 in A2, =IFS(A2>=90,"A",A2>=80,"B",A2>=70,"C",A2>=60,"D",A2<60,"F") returns B. The first test, A2 greater than or equal to 90, is false; the next test, A2 greater than or equal to 80, is true, so Excel returns B.

To enter it in Excel for Microsoft 365 on Windows, select the result cell, type the formula beginning with an equals sign, and press Enter. To use it for other rows, select the formula cell and drag the fill handle down, or copy and paste the formula. Relative references such as A2 adjust to A3, A4, and so on when copied. On Windows, Ctrl+C and Ctrl+V copy and paste; on Mac, use Command+C and Command+V. No special menu command is required.

The examples here use commas between arguments, as in standard English-language Excel settings. Some regional settings use semicolons as the formula separator. If Excel rejects a formula that otherwise looks correct, check the list separator configured for your version and region; you may need to replace the commas with semicolons. Do not change the comma inside a quoted text value unless it is actually part of the value.

Practical examples for grades and thresholds

Threshold formulas are one of the clearest uses for IFS. The order matters: list a higher threshold before a lower one when the result should represent the highest band a value qualifies for. With a score of 72 in A2, the grade example above returns C, because the 90 and 80 tests are false and the 70 test is true. A score of exactly 80 returns B, since the comparison uses greater than or equal to.

A final catch-all condition can make the formula easier to maintain. With a score in A2, =IFS(A2>=90,"A",A2>=80,"B",A2>=70,"C",TRUE,"Below C") returns Below C for a score of 64. TRUE is always true, so it provides a fallback after the meaningful thresholds have failed. This is often safer than writing a last test such as A2<70, especially when the preceding tests already describe the categories you care about.

IFS can also return numeric rates. With a sale amount in B2, =IFS(B2>=10000,0.08,B2>=5000,0.05,TRUE,0) returns 0.05 when B2 contains 7,200. If the result cell is formatted as a percentage, Excel displays 5%. This example only classifies a rate; it does not calculate a commission amount. To calculate the amount as well, you would need to multiply the sale by the returned rate, using a formula designed for your specific rules.

For text-based rules, tests can compare a cell with a quoted label. With a status in B2 and a due date in C2, =IFS(AND(B2="Paid",C2<=TODAY()),"Closed",B2="Paid","Paid - check date",B2="Overdue","Follow up",TRUE,"Review") returns Closed when B2 says Paid and the date in C2 is today or earlier. The AND function makes the first test true only when both conditions are true. TODAY updates as the workbook recalculates, so this kind of date-based result can change over time.

Why condition order and overlaps matter

IFS returns the first match, not the most specific match and not the last one. If conditions overlap, arrange them so the first true condition produces the intended result. For example, the test A2>=70 also includes scores of 90 and above. If that broad test appears before A2>=90, a score of 95 will receive the result for the 70-point band, because Excel stops at that earlier match.

This first-match behavior is useful for ordered bands, but it also creates a common source of mistakes. Before filling the formula down a column, check boundary values: the exact threshold, one value below it, and one value above it. For a grading scale, test 89, 90, and 91; for a discount scale, test the minimum qualifying order and the amount just below it. These checks help catch both reversed operators and misplaced conditions.

Conditions do not have to be simple comparisons. You can use functions such as AND or OR within a logical test when a rule depends on multiple facts. Keep complex tests understandable, though. If a formula becomes difficult to review, separate part of the logic into a helper column or use a small reference table. A shorter formula is not automatically safer if readers cannot tell which rule takes priority.

Fallbacks, blanks, and error handling

If every logical test in IFS is false and there is no final catch-all condition, Excel returns the #N/A error. Adding TRUE and a suitable final result prevents that outcome for ordinary inputs. The fallback should communicate what the data means, such as Other, Review, or Below minimum, rather than silently assigning a misleading category.

Blank cells need deliberate handling in numeric rules. A blank referenced in a comparison may behave like zero in some numeric comparisons, so a blank score can accidentally fall into the lowest band. With a score in A2, =IFS(A2="","",A2>=90,"A",A2>=80,"B",A2>=70,"C",A2>=60,"D",TRUE,"F") returns an empty string when A2 is blank and otherwise assigns a category. The empty string is a formula result that looks blank in the cell; it is not the same as deleting the formula.

Errors in referenced cells can also affect a logical test. If an input cell contains an error, a comparison using that cell may return an error instead of TRUE or FALSE, and IFS cannot use that failed comparison as an ordinary match. Find and correct the source error, or decide explicitly how the formula should treat error values. IFERROR can be useful in some designs, but wrapping a formula in it without understanding the cause can hide data problems.

For easier troubleshooting, temporarily simplify the formula or evaluate its conditions one at a time in spare cells. Verify that each comparison returns TRUE or FALSE for a sample row, confirm that every condition has a paired result, and make sure text values are spelled consistently. Also check whether the formula uses straight quotation marks around text. Excel may reject curly quotation marks copied from formatted text.

IFS compared with IF, SWITCH, and lookup tables

Use IFS when you have several different logical tests and want the first matching result. Nested IF can express similar logic and is supported in older Excel versions, but a long chain of IF functions is often harder to read and edit. IFS does not remove the need to plan the rules; it simply presents multiple condition-result pairs in a more direct structure.

Use SWITCH when one expression is being compared with a list of exact values, such as mapping a code like A, B, or C to a description. IFS is more flexible when the tests use ranges or different comparisons, such as greater than, less than, or combined conditions. For many thresholds that change regularly, a lookup table may be easier to maintain than a long formula: put the breakpoints and associated results in cells, then use an appropriate lookup method. That allows someone to update a threshold without editing the formula itself.

There is no universal winner. A few stable categories can be clear in IFS; a long list of exact matches may suit SWITCH; a changing set of rules may belong in a table. Consider who will maintain the workbook, how often the rules change, and whether the ranges overlap. Whatever method you choose, document unusual business rules near the data or in a note so the formula is not the only record of how the result is determined.

Common IFS mistakes to avoid

  • Putting broad tests first: A general condition can capture values intended for a later, more specific condition. Put the intended priority first.
  • Leaving out the fallback: If no condition is true, IFS returns #N/A. Add a final catch-all result when the formula should handle all expected inputs.
  • Using the wrong boundary operator: Decide whether a threshold includes its exact value. Use >= for inclusive minimums and > for values strictly above the threshold.
  • Forgetting text quotation marks: Text results such as “Approved” need quotation marks in a formula; a cell reference does not.
  • Ignoring empty inputs: Decide whether a blank should stay blank, receive a category, or be flagged for review.
  • Expecting case-sensitive text matching: Standard Excel text comparisons are generally not case-sensitive. If capitalization itself matters, use a case-sensitive approach such as the EXACT function as part of the logic.

When Excel displays a function-name error, check that the Excel version supports IFS and that the function name and separators are correct. When the formula is accepted but returns the wrong category, inspect the condition order and test the boundary values rather than changing the result labels first. These two kinds of problems have different causes and are easier to solve separately.

Frequently Asked Questions

What does IFS mean in Excel?
IFS is a function that checks multiple conditions in order and returns the result paired with the first condition that is true. It is commonly used for categories and threshold-based rules.

What happens if no IFS condition is true?
Excel returns #N/A if every test is false and the formula has no matching fallback. Add a final TRUE condition with a result such as Other or Review when that is the intended behavior.

Can IFS return text as well as numbers?
Yes. A result can be text, a number, a cell reference, or a calculation. Put quotation marks around literal text in the formula, but not around a cell reference.

Is IFS available in Excel 2016?
IFS is supported in Microsoft 365 and Excel 2019 and later, but it is not supported in Excel 2016. In an older version, use nested IF functions or another method compatible with that version.

Can I use AND or OR inside IFS?
Yes. AND or OR can combine multiple criteria into a logical test. For example, a condition can require both a matching status and a date within a specified range.

Is IFS better than nested IF?
For several different conditions, IFS is often easier to read because it lists the condition-result pairs in sequence. Nested IF may be necessary for compatibility with older Excel versions, and a lookup table may be better when the rules are numerous or frequently updated.

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.