SWITCH
Logical
Evaluates a value against a list of values and returns the corresponding result.
Translations
EnglishSWITCH
FrenchCHOISIR.SI
SpanishCAMBIAR
GermanERSTERWERT
ItalianSWITCH
PortugueseMUDAR
DutchSCHAKEL
PolishPRZEŁĄCZ
RussianПЕРЕКЛЮЧ
TurkishDEĞKONT
CzechSWITCH
HungarianKAPCSOLÓ
SwedishBYT
DanishSKIFT
FinnishVAIHDA
Syntax
SWITCH(expression, value1, result1, [value2, result2], ..., [default])Arguments
expressionValue to evaluatevalue1First value to matchresult1Result if matcheddefaultDefault if no match(optional)
Examples
=SWITCH(A1,1,"Jan",2,"Feb",3,"Mar","Unknown")Month name
Number to month name
=SWITCH(B1,"FR","France","DE","Germany","US","United States")Country name
Code to full name
=SWITCH(WEEKDAY(A1),1,"Weekend",7,"Weekend","Weekday")Day type
Classify by day
Tips & Best Practices
- •Cleaner than nested IFs for exact matches
- •Last argument without a pair is the default
- •Available in Excel 2019 and later
Common Mistakes
- •Forgetting to include a default value at the end of the arguments list, causing SWITCH to return a #N/A error whenever the expression doesn't match any of the listed values
- •Using SWITCH for range-based conditions (like 'greater than 100') instead of exact-value matching - SWITCH only compares for equality, and range logic needs IF or IFS instead
- •Nesting multiple IFs to check the same single value against different results, when SWITCH would express the same logic far more clearly and with less repetition
Related Functions
IFSEvaluates a series of independent conditions rather than matching a single expression against a list of values, better suited to range-based or mixed-condition logic than SWITCH.CHOOSESelects a result by numeric position instead of by matching a value, useful when the index is already a simple sequential number.IFHandles a simple two-outcome decision, while SWITCH scales better to three or more possible exact-match outcomes.Frequently Asked Questions
Why does SWITCH return #N/A?
The expression didn't match any of the listed values, and no default value was provided at the end of the arguments. Add a final catch-all value to avoid the error.
Can SWITCH handle conditions like 'greater than' or 'less than'?
No, SWITCH only matches exact values. For range-based conditions, use IF or IFS instead.
When should I use SWITCH instead of nested IFs?
When you're comparing one single value against several possible exact matches - SWITCH expresses that logic far more clearly than a long chain of nested IF statements.
Need to translate a formula using SWITCH?
Use our translator to convert your complete formula
