Using IFS Formula in Excel: Syntax and Examples

Formulas & functions · Updated November 20, 2026

In Excel, use the IFS function to test conditions in order and return a value for the first condition that is true. For example, with a score in A2, =IFS(A2>=90,"A",A2>=80,"B",A2>=70,"C",A2>=60,"D",TRUE,"F") returns a letter grade; if A2 is 84, the result is B.

What the IFS function does

IFS is a logical function for choosing among multiple outcomes. It checks a sequence of tests from left to right. As soon as one test is true, Excel returns the value paired with that test and stops checking the remaining pairs. This makes IFS useful for rules such as grading bands, shipping categories, eligibility labels, or commission tiers.

Unlike a lookup table, an IFS formula puts the decision rules directly into the formula. That can be convenient when there are only a few conditions and the rules are unlikely to change. It can also make a worksheet harder to maintain if the rule list becomes long, so the best approach depends on how many categories you need and how often the rules change.

IFS does not add the results together or return every matching result. It returns one value: the result associated with the first true test. That first-match behavior matters when conditions overlap. If two tests could both be true, put the more specific or higher-priority test first.

IFS syntax and its key rules

An IFS formula is made of pairs: a condition to test, followed by the value to return if that condition is true. In the example below, the assumed layout is a numeric score in cell A2. The formula uses a final TRUE condition as a catch-all for any score that did not meet an earlier threshold.

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

Each test can be a comparison such as greater than or equal to, an equality check, or a logical expression. A returned value may be text in quotation marks, a number, a date, or a cell reference. Keep the number of tests and corresponding results paired: each condition needs its own return value. Excel allows up to 127 condition-and-result pairs in one IFS function, although a formula with that many branches is often difficult to review.

  • Put text results inside straight double quotation marks, such as "Approved".
  • Use commas between arguments in standard English-language Excel settings. Some regional settings use semicolons instead.
  • Remember that the first true test wins; later tests are not evaluated for the result.
  • Add a final catch-all pair if every possible input should produce a deliberate result.

Build an IFS formula step by step

Before entering the formula, write down the conditions and decide what should happen for inputs that do not fit any listed case. Then order the conditions from highest priority to lowest priority. In Microsoft Excel for Microsoft 365 on Windows, select the result cell, type the formula in the formula bar or directly in the cell, and press Enter. Copy the formula down if each row should be evaluated using its own input.

  1. Identify the input cell or cells, such as a score in A2.
  2. Write each condition as a test, such as whether the score is at least 90.
  3. Pair each test with the result it should return.
  4. Check that the tests are ordered correctly, especially where ranges might overlap.
  5. Add a fallback result, often using TRUE as the last test.
  6. Try boundary values as well as typical values to confirm the thresholds behave as intended.

In the grade example, the layout is a score in A2, with 90, 80, 70, and 60 as the grade cutoffs. The formula returns B for A2 equal to 84 because the first true condition is that the score is at least 80.

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

Notice that the formula tests descending thresholds. If the test for 60 or more came first, a score of 95 would satisfy that condition and receive D; Excel would stop before reaching the test for 90. The order is not a cosmetic choice: it determines the outcome.

Use a fallback to handle every other case

A common IFS mistake is assuming the function automatically returns a blank or a default value when none of its tests is true. It does not. If every test is false and there is no final catch-all pair, Excel returns the #N/A error. A final TRUE test is a straightforward way to specify what should happen in all remaining cases.

For example, with a review status stored in A2, the following layout assumes A2 contains a status label and returns a message for the two recognized labels. The final TRUE branch catches anything else, including an unexpected label.

=IFS(A2="Complete","Ready to file",A2="Pending","Needs follow-up",TRUE,"Check status")

If A2 contains Pending, the result is Needs follow-up. If it contains another value, the result is Check status. This is usually safer than silently treating unrecognized data as if it belonged to a valid category. If you prefer an empty result for unmatched cases, an empty text value can be the final return value; however, a visible message can make data-entry problems easier to spot.

Combine multiple conditions

Each IFS test can include more than one requirement by using functions such as AND or OR. AND is true only when all its included tests are true; OR is true when at least one included test is true. This lets IFS choose among rules that depend on both a category and a measurement.

Suppose A2 contains a department and B2 contains the number of units sold. The following formula assumes those cells hold the row’s department and sales count. It gives Sales a special result at 100 or more units, gives other qualifying departments a general target message, and uses a fallback for lower counts.

=IFS(AND(A2="Sales",B2>=100),"Sales bonus",B2>=100,"Target met",TRUE,"Below target")

If A2 is Sales and B2 is 125, the first condition is true and the result is Sales bonus. If A2 is Support and B2 is 125, the first condition is false, but the second is true, so the result is Target met. This example also shows why ordering matters: putting the general 100-or-more test first would prevent the special Sales result from being reached.

IFS compared with IF and other options

IFS can make several alternatives easier to scan than deeply nested IF functions. Nested IF remains useful when you need broad compatibility with older Excel releases that do not recognize IFS, or when one branch needs its own additional decision logic. Its downside is that each new layer adds another set of parentheses, which can make errors harder to find.

SWITCH is another option when one expression is being compared with a list of exact values, such as a department code matching one of several labels. IFS is generally more suitable for inequalities and different tests, such as a value falling into a range. Neither function is automatically the best choice for a long, frequently edited set of business rules. A small reference table and a lookup formula can be easier to update than editing a large formula, particularly when other people maintain the workbook.

For simple yes-or-no decisions, ordinary IF is often clearer. For several conditions that involve ranges or multiple tests, IFS may be easier to read. Choose based on the shape of the decision, the Excel versions used by the workbook’s audience, and how likely the rules are to change.

Common errors and ways to troubleshoot

If an IFS formula produces an unexpected answer, check the order of its tests first. A broad condition near the beginning may be true before a more specific condition is reached. Then verify the boundary operators: for example, greater than 80 excludes 80, while greater than or equal to 80 includes it.

  • #N/A: Every test evaluated false and there is no final fallback. Add a catch-all condition and result if unmatched values need a defined outcome.
  • #NAME?: Excel may not recognize the function name, which can happen in an older Excel version. Check the version and spelling.
  • Wrong category at a threshold: Test the exact boundary value, such as 80, as well as values just below and above it. Confirm the comparison signs match the intended rule.
  • Text does not match: Check spelling and spaces in text comparisons. A value with an extra space may not match the label in the formula.
  • Formula shows as text: Check whether the cell is formatted as Text or whether an apostrophe was entered before the equals sign. Change the cell format to General, then re-enter the formula.

When copying a formula down a column, normal references such as A2 adjust to A3, A4, and so on. If a condition refers to a fixed cell containing a cutoff, consider making that reference absolute with dollar signs so it does not move when copied. Test a few rows after filling the formula to ensure each row points to the intended inputs.

Availability and compatibility

IFS is available in Excel for Microsoft 365 and in Excel 2019 and later, including Excel 2021 and Excel 2024. It is also available in Excel for the web. The function is supported in current Excel for Mac as well; the main formula behavior is the same across these platforms. Regional list-separator settings may affect whether formulas use commas or semicolons, but that is a setting difference rather than a different IFS rule.

If a workbook is opened in an older Excel version that does not support IFS, the formula may display as an unrecognized-function error. If the file must work in such versions, consider replacing IFS with nested IF functions or a lookup-based design that the target version supports. Confirm compatibility on the actual versions used by recipients before distributing a workbook; merely saving the file in a newer format does not make an unsupported function available in an older application.

Frequently Asked Questions

What does IFS mean in Excel?
IFS is a function that tests conditions in order and returns the result paired with the first condition that evaluates to true. It is designed for decisions with multiple possible outcomes.

Does IFS need a final TRUE condition?
No, but a final TRUE condition is useful when every input should return a deliberate fallback. Without it, if no condition is true, IFS returns #N/A.

Can I use AND or OR inside IFS?
Yes. Use AND when all requirements in a branch must be met, or OR when any one of several requirements is enough. Put the combined logical expression in the condition position.

Why is my IFS formula returning the wrong result?
The most common cause is an earlier condition that is too broad and becomes true before the intended condition. Check the sequence of tests, comparison operators, exact threshold values, and text spelling.

Is IFS available in older versions of Excel?
IFS is available in Excel 2019 and later, including Microsoft 365, but not in every older release. For a workbook that must run in older Excel, use a compatible alternative such as nested IF and verify it in the target version.

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.