SWITCH vs IFS in Excel: Which to Use
By ExcelReady TeamUpdated 7 min read
The short answer
Use SWITCH when you compare one cell against a list of exact values, such as turning the code N into North. Use IFS when each check is a different condition, such as a score of 90 or more. SWITCH has a built-in default result; IFS needs TRUE as its last test. Both need Excel 2019 or later.
Key takeaways
- SWITCH checks one expression for exact matches; IFS checks a separate TRUE or FALSE test for each result.
- SWITCH names the cell once, so code-to-label formulas are shorter and easier to edit.
- Only IFS can test ranges like >=90 directly. SWITCH needs the SWITCH(TRUE, ...) workaround.
- SWITCH takes a default as its last argument. IFS has no default, so end it with TRUE, "result".
- Both return #N/A when nothing matches and there is no fallback.
On this page+
SWITCH vs IFS comes down to one question: are you matching one value against a list, or testing different conditions? SWITCH is best for exact matches, like turning a region code into a region name. IFS is best for ranges and mixed tests, like grading a score of 90 or more as an A. This guide compares them side by side on the same data, so you can pick the right one in a report or a job test.
SWITCH vs IFS at a glance#
Both functions replace long nested IF formulas, but they ask different questions.
| Feature | SWITCH | IFS |
|---|---|---|
| Syntax | =SWITCH(expression, value1, result1, ..., [default]) | =IFS(test1, result1, [test2, result2], ...) |
| What it checks | One expression against exact values | A separate TRUE/FALSE test for each result |
Ranges like >=90 | Not directly (needs SWITCH(TRUE, ...)) | Yes |
| Tests on different cells | No (one expression) | Yes |
| Default result | Last argument, if the count is odd | None; use TRUE, "result" as the last pair |
| No match and no default | #N/A | #N/A |
| Maximum | 126 value/result pairs | 127 test/result pairs |
| Excel versions | Excel 2019 and later, Microsoft 365 | Excel 2019 and later, Microsoft 365 |
How the syntax differs#
SWITCH names the thing to check once, then lists possible values and their results:
=SWITCH(expression, value1, result1, [value2, result2], ..., [default])- expression is usually a cell, such as
B2. - value1, result1 is a pair: if the expression equals value1, return result1.
- default is an optional last argument with no partner. It is returned when nothing matches.
IFS has no expression. Each pair is a complete test and a result:
=IFS(logical_test1, value_if_true1, [logical_test2, value_if_true2], ...)IFS returns the result for the first test that is TRUE, so the order of the tests matters. The IFS function guide lists every argument.
The same tasks solved both ways#
Here is a small sales team list in A1:C6:
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Region | Score |
| 2 | Lena | N | 92 |
| 3 | Omar | S | 78 |
| 4 | Priya | E | 61 |
| 5 | Jon | W | 55 |
| 6 | Kai | X | 84 |
Task 1: turn a code into a name (exact match)#
Both formulas below return North for row 2 and Unknown for Kai's code X in row 6:
=SWITCH(B2,"N","North","S","South","E","East","W","West","Unknown")
=IFS(B2="N","North",B2="S","South",B2="E","East",B2="W","West",TRUE,"Unknown")SWITCH is shorter because it names B2 once. In the IFS version, B2 appears four times, and you need TRUE,"Unknown" at the end as the fallback. If you later point the formula at column C instead, you change one reference in SWITCH and four in IFS.
Task 2: grade a score (ranges)#
Grade 90 and over as A, 75 and over as B, 60 and over as C, and anything lower as F. IFS handles this directly:
=IFS(C2>=90,"A",C2>=75,"B",C2>=60,"C",TRUE,"F")The results down the list are A, B, C, F, B. Lena's 92 passes the first test. Kai's 84 fails >=90 but passes >=75, so he gets B.
SWITCH can't compare with >= on its own, because it only checks whether two values are equal. The workaround is to switch on TRUE:
=SWITCH(TRUE,C2>=90,"A",C2>=75,"B",C2>=60,"C","F")This works: SWITCH looks for the first test that equals TRUE. It returns the same grades, but it is harder to read, and many people won't recognise the pattern.
Task 3: tests on two different columns#
Now flag each rep. An unknown region code should say "Check code", a score under 60 should say "Coaching", and everyone else is "OK". The tests look at two different cells, so IFS is the natural fit:
=IFS(B2="X","Check code",C2<60,"Coaching",TRUE,"OK")The results down the list are OK, OK, OK, Coaching, Check code. Jon's 55 triggers the second test. Kai's code X triggers the first, so his score is never checked. SWITCH has no way to do this except the SWITCH(TRUE, ...) pattern again, because its single expression can only be one cell or one calculation.
When to use SWITCH#
Use SWITCH when every check is "is this cell equal to that value?". It fits well when:
- You map codes to labels, such as N to North, P to Pending or 1 to January.
- The list of values is long. Each extra pair adds just two arguments, and the cell is named only once.
- The checked value is a formula. In
=SWITCH(WEEKDAY(A2),1,"Sunday",7,"Saturday","Weekday"), WEEKDAY is written and calculated once. In IFS you would repeat it in every test. - You want a clear default. The last single argument reads naturally as "anything else".
If the values are simply 1, 2, 3 and so on, CHOOSE may be even shorter. The comparison of CHOOSE vs SWITCH shows when, and the guide to the SWITCH function covers more examples.
When to use IFS#
Use IFS when the checks are conditions rather than exact values. It is the better choice when:
- You test ranges, such as scores, ages, sales bands or days overdue.
- Each test looks at a different cell, such as
=IFS(D2="Cancelled","No",E2>1000,"Review",TRUE,"OK"). - Tests combine functions, such as
ISBLANK(B2)orAND(B2>0,C2="Yes"). - You are replacing a nested IF. IFS reads in the same order, without the stack of closing brackets.
The article on nested IF vs IFS shows that rewrite step by step, and the full IFS function guide covers more use cases.
Common mistakes with SWITCH and IFS#
These are the errors that most often give wrong results or #N/A:
- Forgetting the fallback in IFS. Without
TRUE,"result"at the end, any row that fails every test shows #N/A. - Putting tests in the wrong order in IFS.
=IFS(C2>=60,"C",C2>=90,"A",...)gives everyone with 60 or more a C, because IFS stops at the first TRUE. Test the highest band first. - Using comparisons in SWITCH.
=SWITCH(C2,">=90","A")looks for the text ">=90" and never matches a number. - Mismatched types. In SWITCH, the number 1 and the text "1" are different. If the codes were imported as text, write
"1"in the formula, or convert the column first. - Older Excel versions. Excel 2016 and earlier show #NAME? for both. If the file goes to people on old versions, use nested IF or a lookup table instead.
- Very long lists. Past ten or so pairs, a small lookup table with XLOOKUP or VLOOKUP is easier to update than either function, and other formulas can share it.
A quick way to test any SWITCH or IFS formula: try one value from each band, plus one that should hit the default. If the default never appears, a test is too broad.
Our recommendation#
Pick by the shape of the question. If you're matching one cell against fixed values, use SWITCH: it's shorter, names the cell once and has a clean default. If you're testing ranges, several cells or combined conditions, use IFS, and always end it with TRUE,"result" so no row falls through to #N/A.
Learn IFS first if you only learn one. It covers every case SWITCH covers, just more verbosely, and range tests like grades and commission bands come up more often in job tests. Then add SWITCH for code-to-label tasks. Keep the SWITCH(TRUE, ...) trick for reading other people's files, not for your own. For more than about ten values, move them into a table and use a lookup. The CHOOSE function guide covers the third option for numbered lists.
Practise it#
Try the exercise on this page first: it's a code-to-name task, which is exactly where SWITCH shines. Then practise nested IF and IFS in a live spreadsheet, where you build grade and commission bands, and move on to the IS functions and SWITCH lesson to turn short codes into labels. Each formula is checked as soon as you press Enter.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Turn the region code in B2 into a full name. In D2, use SWITCH: N is North, S is South, E is East, W is West, and anything else is Unknown.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region name | ||||
| 2 | |||||
| 3 | |||||
| 4 | |||||
| 5 | |||||
| 6 | |||||
| 7 | |||||
| 8 | |||||
| 9 |
Tip: Name B2 once, then list pairs: "N","North", "S","South" and so on. The last single argument, "Unknown", is the default.
Practise this in a lesson
Frequently asked questions
What is the difference between SWITCH and IFS in Excel?
SWITCH compares one value against a list of exact matches and returns the result for the first match. IFS runs a separate condition for each result, so it can test ranges like greater than or equal to 90.
Is SWITCH faster than IFS?
For exact matches on one cell, SWITCH evaluates the cell once while IFS repeats it in every test. On normal-sized sheets you won't notice a speed difference, so choose the one that is easier to read.
Can SWITCH use greater than or less than?
Not directly, because SWITCH only checks exact matches. A common workaround is =SWITCH(TRUE,B2>=90,"A",B2>=75,"B","C"), but IFS is usually clearer for ranges.
How do I add a default value to IFS?
Make the last test TRUE, which is always true: =IFS(B2>=90,"A",B2>=75,"B",TRUE,"C"). Without it, IFS returns #N/A when no test is true.
Which Excel versions have SWITCH and IFS?
Both are in Excel 2019, Excel 2021, Excel 2024, Microsoft 365 and Excel for the web. In Excel 2016 and earlier, they show #NAME?.