Excel’s IFS function checks conditions in order and returns the value paired with the first condition that is true. For example, with a student’s score in B2, =IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",B2>=60,"D",TRUE,"F") returns B when B2 contains 87; the final TRUE supplies a result when no earlier score band matches.
What the IFS Function Does
IFS is useful when a formula needs to choose among several outcomes. Instead of nesting one IF function inside another, you list a series of condition-and-result pairs in a single formula. Typical uses include assigning letter grades, labeling order sizes, classifying dates, and mapping status text to a clearer description.
The function is available in Microsoft 365 and Excel 2019 or later, including Excel 2021 and Excel 2024. A workbook containing IFS may not calculate correctly in older Excel releases, such as Excel 2016, which do not support the function. IFS works in Excel for Windows, Excel for Mac, and Excel for the web when the version supports it. The formulas here use commas as argument separators; depending on regional settings, Excel may expect semicolons instead.
How IFS Evaluates Conditions
IFS reads its condition-and-result pairs from left to right. A condition is an expression Excel can evaluate as TRUE or FALSE, such as a comparison, a text match, or a test made with AND. As soon as Excel finds a TRUE condition, it returns that pair’s result and does not use later pairs.
That order is important when conditions overlap. If a formula tests “at least 70” before “at least 90,” a score of 95 satisfies the first condition, so Excel never reaches the higher band. Put the most specific or highest-priority cases first, then move toward broader cases. IFS can contain up to 127 condition-and-result pairs, though a shorter formula is usually easier to check and maintain.
If no condition evaluates to TRUE, IFS returns the #N/A error. A final TRUE condition is a common way to provide a default result. TRUE always evaluates as true, so it catches any value that made it past the earlier tests. The default can be text such as “Other,” a number, or an empty text value.
Example: Assign Letter Grades
Suppose scores are in B2:B30 and you want a grade in C2. With the score for the current row in B2, enter this formula in C2; for a score of 87, it returns B:
=IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",B2>=60,"D",TRUE,"F")
The tests are arranged from the highest threshold to the lowest. A score of 92 returns A, 74 returns C, and 55 returns F. After entering the formula in C2, copy it down the column using the fill handle or copy and paste. Excel adjusts the relative reference from B2 to B3, B4, and so on.
This example assumes that every score is numeric and that scores below 60 receive F. If cells might contain text or blanks, decide how those should be handled rather than letting them fall into a grade band unexpectedly. For example, you could add a blank check before the grade tests, or validate the source data so only permitted scores are entered.
Example: Set a Tiered Commission Rate
Assume a sale amount is in C2 and the rate should be 12% for amounts of at least 10,000, 8% for amounts of at least 5,000, 4% for amounts of at least 1,000, and zero otherwise. With the amount in C2, this formula returns 8% when C2 contains 6,200:
=IFS(C2>=10000,0.12,C2>=5000,0.08,C2>=1000,0.04,TRUE,0)
The formula returns a rate, not the commission amount. Format the result cell as Percentage if you want to display 8% rather than 0.08. To calculate the commission itself, multiply the rate by the sale amount in a separate calculation. With the sale amount in C2 and the rate formula in D2, enter =C2*D2 in E2; for a sale of 6,200 at 8%, the result is 496.
Because the thresholds overlap, the descending order matters here too. An amount of 12,000 is also at least 5,000 and 1,000, but it must match the 10,000 test first to receive the intended 12% rate. These figures are just an example of spreadsheet logic, not a recommendation about compensation terms.
Example: Translate Status Text
Suppose a status is entered in A2 and you want a more descriptive label in B2. With the status in A2, this formula returns “In progress” when A2 contains Pending, “Complete” for Paid, and “Check status” for any other nonblank value:
=IFS(A2="","",A2="Paid","Complete",A2="Pending","In progress",A2="Cancelled","Closed",TRUE,"Check status")
The first pair handles an empty cell by returning an empty string, so blank input does not receive the default message. Text comparisons in this example match the listed words; extra spaces or different wording can prevent an expected match. If data comes from imports or manual entry, consider using data validation or cleaning the source text. For example, a value such as “Pending ” with a trailing space may not behave like the exact text “Pending.”
Example: Classify Dates and Combine Tests
For a due date in D2, you may want to distinguish missing dates, overdue work, items due today, items due within seven days, and later dates. With the due date in D2, enter this formula; if D2 is today plus three days, it returns “Due within 7 days”:
=IFS(D2="","No due date",D2<TODAY(),"Overdue",D2=TODAY(),"Due today",D2<=TODAY()+7,"Due within 7 days",TRUE,"Later")
TODAY() updates when the workbook recalculates, so a date can move from “Later” to “Due within 7 days” as time passes. The formula assumes D2 contains a real Excel date, not text that merely looks like one. If the cells also contain times, a value due today at a particular hour may not equal TODAY() exactly; date-time data may need an adjustment so the comparison matches your intended rule.
IFS can also use AND or OR inside a condition. Suppose B2 contains a score and C2 contains an attendance rate stored as a decimal. With those inputs, this formula returns “Honors” for a score of at least 90 and attendance of at least 90%; otherwise it returns “Pass” for a score of at least 70, or “Retake”:
=IFS(AND(B2>=90,C2>=0.9),"Honors",B2>=70,"Pass",TRUE,"Retake")
AND requires both tests to be true. OR can be used when either of several tests is enough. Check the policy behind the formula carefully: in this example, someone with a score of 75 receives “Pass” even if attendance is low, because attendance is part of the honors condition only. If passing also requires a minimum attendance rate, that rule needs its own condition.
Common IFS Problems and Ways to Check Them
- #N/A: None of the conditions matched. Add a final TRUE-and-result pair if you want a fallback, or inspect whether the conditions cover all possible inputs.
- Wrong category: An earlier condition may be too broad. Reorder overlapping thresholds so the intended higher-priority test comes first.
- Unexpected text result: Check spelling, spaces, and whether the formula compares the same kind of value as the cell contains. A number stored as text can behave differently from a numeric value.
- Formula not accepted: Check for missing commas or parentheses, and confirm whether your regional settings use semicolons as separators. A version of Excel without IFS support may show a function-name error.
- Blank cells receive an odd result: Add an explicit blank test near the beginning if blanks need special treatment. Otherwise, blank cells may be treated like zero in numeric comparisons.
When a result looks wrong, evaluate the formula’s conditions one by one against the input. For a threshold formula, write down which tests are true for a sample value and identify the first true test. This simple trace often reveals an ordering issue faster than rewriting the whole formula. Also check that copied formulas reference the intended row and that thresholds are entered as numbers rather than text.
IFS Compared with IF, SWITCH, and Other Options
Use IFS when each outcome depends on a different logical test, especially when the tests use ranges such as “at least 90” or “before today.” It is often easier to read than nested IF, where each false result contains another IF. Nested IF remains useful for compatibility with older Excel versions that do not support IFS, but long chains can be harder to audit.
SWITCH is an alternative when one expression is compared with several exact values. It is a natural fit for mapping an exact code such as A, B, or C to a description. IFS is more suitable when the tests themselves differ, such as checking a range, a date, or a combination of conditions. For a two-outcome decision, a simple IF may be clearer than either function.
For large or frequently changing rule sets, consider putting thresholds and results in a small lookup table instead of embedding every rule in a formula. A table is easier for nontechnical users to update and can make policy changes more visible. The best choice depends on whether the rules are short and stable or numerous and maintained as data.
Frequently Asked Questions
What does IFS return if no condition is true? It returns #N/A unless the formula includes a matching later condition. Add a final TRUE condition with a default result, such as “Other,” to cover values that do not match earlier tests.
Does IFS stop after the first true condition? Yes. It evaluates the tests from left to right and returns the result for the first TRUE test. That is why overlapping conditions need to be ordered by priority.
Can I use AND or OR in an IFS formula? Yes. Put AND or OR inside a logical test when a result depends on multiple requirements. AND requires all its arguments to be true; OR requires at least one to be true.
Why does my IFS formula show #NAME? Your Excel version may not support IFS, the function name may be misspelled, or the formula may have been entered in an application that does not recognize it. IFS is supported in Microsoft 365 and Excel 2019 or later.
Can IFS return a blank? Yes. Use an empty text value, written as two double quotes, as a result. For example, with a status in A2, =IFS(A2="","",TRUE,"Review") returns a blank when A2 is empty and “Review” otherwise.
Related
- Multiply Hours by Money in Excel: A Practical Guide
- How to Multiply a List of Numbers in Excel: 10 Methods
- How to Multiply Hours by Rate in Excel and Format Totals
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- How to Find Standard Deviation in Excel With FormulasTo find standard deviation in Excel, enter =STDEV.S(B2:B9) for a sample or =STDEV.P(B2:B9) for an entire population, replacing…
- Excel Formula for Difference Between Two Numbers ExplainedTo find the difference between two numbers in Excel, subtract one cell from the other: if the first…
- How to Share an Outlook Calendar With the Right PermissionsTo share an Outlook calendar, open Calendar, choose Share Calendar, enter the recipient’s email address, set what they…
- VLOOKUP Examples in Excel: Formulas That WorkVLOOKUP finds a value in the first column of a range and returns a value from another column…
- Excel Formula for Holiday Dates: Fixed and Moving DaysFor a holiday that falls on the same month and day each year, use =DATE($B$1,1,1), assuming the year…
- COUNTIF Excel: How to Reference Cells in CriteriaTo make COUNTIF use a cell as its criterion, put the cell reference in the second argument: with…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.