The IFS function in Excel checks several conditions in order and returns the value for the first one that is TRUE. Its syntax is =IFS(test1, value1, test2, value2, ...), for example =IFS(A2>=70,"Distinction",A2>=50,"Pass",TRUE,"Fail"). IFS replaces long nested IF formulas and works in Excel 2019, 2021, 2024 and Microsoft 365.
| Function | What it does | Syntax |
|---|---|---|
| IFS | Returns a value for the first TRUE condition | IFS(logical_test1, value_if_true1, ...) |
| MINIFS | Smallest value that meets criteria | MINIFS(min_range, criteria_range1, criteria1, ...) |
| MAXIFS | Largest value that meets criteria | MAXIFS(max_range, criteria_range1, criteria1, ...) |
| SWITCH | Matches one value against a list | SWITCH(expression, value1, result1, ..., [default]) |
How does the IFS function work in Excel?
IFS takes pairs of arguments: a logical test, then the value to return if that test is TRUE. Excel checks the tests from left to right and stops at the first TRUE one, so the order of your conditions matters. You can include up to 127 test-and-value pairs.
Microsoft's IFS function reference sets out two rules worth remembering. If no test is TRUE, IFS returns the #N/A error. And if you supply a test without a matching value, Excel shows a message that you've entered too few arguments.
Here's how IFS compares with the nested IF it replaces. Both formulas give the same grades:
=IF(A2>=70,"Distinction",IF(A2>=60,"Merit",IF(A2>=50,"Pass","Fail")))
=IFS(A2>=70,"Distinction",A2>=60,"Merit",A2>=50,"Pass",TRUE,"Fail")
The IFS version has one set of brackets and reads as a simple list. If you're still getting to grips with single conditions, start with our guide to IF then statements in Excel.
How do I write an IFS formula step by step?
Write your conditions from the most restrictive to the least, then finish with TRUE as a catch-all. Using the grade example with scores in column A:

- Click B2 and type
=IFS(. - Add the highest band first:
A2>=70,"Distinction",. - Add the next band:
A2>=60,"Merit",, thenA2>=50,"Pass",. - Finish with the default:
TRUE,"Fail"). - Press Enter and fill the formula down.
| A: Score | B: Result | Why |
|---|---|---|
| 82 | Distinction | First test is TRUE |
| 64 | Merit | Second test is the first TRUE one |
| 50 | Pass | Third test, >= includes 50 |
| 38 | Fail | Only the TRUE default matches |
The final TRUE,"Fail" pair acts as an "else". Because TRUE is always true, it catches anything the earlier tests missed and prevents #N/A errors.
What we commonly see: conditions written in the wrong order. With =IFS(A2>=50,"Pass",A2>=70,"Distinction",TRUE,"Fail"), a score of 82 returns "Pass", because 82 is also at least 50 and that test comes first. When you test thresholds with >=, start with the highest; with <=, start with the lowest.
Can I use IFS with AND, OR and text conditions?
Yes. Each logical test can be any formula that returns TRUE or FALSE, including AND, OR, text comparisons and other functions. For example, to label orders by region and value:
=IFS(AND(B2="UK",C2>1000),"Priority UK",
B2="UK","Standard UK",
C2>1000,"Priority export",
TRUE,"Standard export")
You can press Alt+Enter inside the formula bar to break a long IFS onto separate lines, as above, which makes it much easier to read and edit. Text comparisons in IFS aren't case-sensitive, so B2="uk" matches "UK". To test that a value is anything except a given item, use the <> operator explained in our guide to not equal to in Excel.
When every test compares the same cell against fixed values, SWITCH is often tidier: =SWITCH(B2,"UK","Domestic","IE","EU","Other"). Unlike IFS, SWITCH lets you put the default as a final single argument, with no TRUE needed.
What is MINIFS in Excel and how do I use it?
MINIFS returns the smallest value in a range that meets one or more criteria. Its syntax is =MINIFS(min_range, criteria_range1, criteria1, ...), with the range to search for the minimum first. MAXIFS works the same way for the largest value.

Worked example with region in column A, product in column B and price in column C:
| A: Region | B: Product | C: Price |
|---|---|---|
| North | Laptop | 720 |
| South | Laptop | 690 |
| North | Laptop | 655 |
| North | Monitor | 180 |
-
=MINIFS(C2:C5,B2:B5,"Laptop")returns 655, the lowest laptop price. -
=MINIFS(C2:C5,A2:A5,"North",B2:B5,"Laptop")returns 655, the lowest North laptop price. -
=MAXIFS(C2:C5,A2:A5,"North")returns 720.
Microsoft's MINIFS function page notes that it returns 0 when no cells meet the criteria, and #VALUE! when the min range and criteria ranges are different sizes. That 0 can be misleading in a price list, so wrap the formula to show something clearer: =IF(COUNTIFS(B2:B5,"Tablet")=0,"None",MINIFS(C2:C5,B2:B5,"Tablet")).
Can IFS and MINIFS work together?
Yes. A common pattern uses MINIFS or MAXIFS to find a threshold and IFS to classify each row against it. For example, to flag the cheapest offer for each product:
=IFS(C2=MINIFS($C$2:$C$5,$B$2:$B$5,B2),"Cheapest",
C2=MAXIFS($C$2:$C$5,$B$2:$B$5,B2),"Most expensive",
TRUE,"")
The dollar signs keep the ranges fixed as you fill down, while B2 changes on each row so every product is compared only with itself.
Advanced nuance: IFS evaluates its tests in order and stops at the first TRUE, but an error in an earlier test still breaks the whole formula. If A2 is text and your first test is A2/B2>1, IFS returns #VALUE! instead of moving on. Guard risky tests with ISNUMBER, or wrap the formula in IFERROR, and keep the TRUE default at the end so blank or unexpected inputs get a sensible result.
Which Excel versions have IFS and MINIFS?
IFS, MINIFS, MAXIFS and SWITCH are available in Excel 2019, Excel 2021, Excel 2024 and Microsoft 365, on both Windows and Mac, and in Excel for the web. They are not in Excel 2016 or earlier. If you open a workbook that uses them in Excel 2016, the cells show the #NAME? error, because that version doesn't recognise the function names.

On Excel 2016, use nested IF instead of IFS, and an array formula such as =MIN(IF(B2:B5="Laptop",C2:C5)) confirmed with Ctrl+Shift+Enter instead of MINIFS. Also keep support dates in mind: Office 2019 support ended on 14 October 2025 and Office 2021 support ended on 13 October 2026, while Excel 2024 is supported until 9 October 2029. Our comparison of Office 2016, 2019, 2021 and 2024 sets out the differences, and the Office 2024 collection lists current editions that include all of these functions.
Frequently asked questions
Why does my IFS formula return #N/A?
IFS returns #N/A when none of its logical tests is TRUE. Typically a value falls outside every band you defined, or a cell is blank. Add TRUE,"your default" as the last pair so there's always a result. If you want blanks treated separately, add a first test such as A2="","" before the other conditions.
Is IFS better than nested IF?
For three or more conditions, IFS is usually easier to read and edit, because the conditions sit in one flat list without repeated brackets. Nested IF still has two advantages: it works in Excel 2016, and it has a built-in "else" argument. If you share files with people on Excel 2016, stick with nested IF or confirm their version first.
How many conditions can IFS handle?
IFS accepts up to 127 pairs of conditions and values. In practice, if you need more than eight or ten, a lookup table is easier to maintain. Put the thresholds and results in two columns and use XLOOKUP with match mode -1, or VLOOKUP with approximate match, so you can change bands without editing the formula.
What is the difference between MINIFS and MIN with IF?
Both find the smallest value that meets a condition. MINIFS is a single, readable function that handles several criteria and doesn't need array entry. The older =MIN(IF(...)) approach works in Excel 2016 but needs Ctrl+Shift+Enter there. MINIFS returns 0 when nothing matches, while MIN(IF()) also returns 0, so test with COUNTIFS when that matters.
Can IFS return a formula instead of text?
Yes. Each value argument can be a number, text, cell reference or calculation. For example, =IFS(B2="Gold",C2*0.8,B2="Silver",C2*0.9,TRUE,C2) applies a 20% or 10% discount depending on the tier. Excel only calculates the result for the first TRUE test, so the other value arguments are not used in that cell.
Related guides
- How to write an IF then statement in Excel
- Not equal to in Excel: using <>
- What is VLOOKUP in Excel?
- INDEX MATCH with multiple criteria
Links in this guide
| Link | Type | Why it helps |
|---|---|---|
| Microsoft Support: IFS function | External | Official syntax, limits and #N/A behaviour |
| Microsoft Support: MINIFS function | External | Official syntax and zero-result rule |
| IF then statements in Excel | Internal | Single-condition basics before IFS |
| Not equal to in Excel | Internal | Exclusion tests inside IFS |
| Office versions compared | Internal | Which versions include IFS |
| Office 2024 collection | Internal | Current editions with IFS and MINIFS |
| What is VLOOKUP in Excel | Internal | Lookup-table alternative to long IFS |
| INDEX MATCH with multiple criteria | Internal | Return values by several conditions |
