How do I use SWITCH in Excel?
Use SWITCH when you want to map values to different outputs. Enter Expression, Value 1, Result 1 in that order, then add optional arguments when needed.
Matches expression to values and returns mapped result.
SWITCH(expression, value1, result1, [default])expression
RequiredEnter an expression such as comparison or calculation.
value1
RequiredEnter a text value (wrap with quotes when needed).
result1
RequiredEnter a text value (wrap with quotes when needed).
value2
OptionalEnter a text value (wrap with quotes when needed).
result2
OptionalEnter a text value (wrap with quotes when needed).
default
OptionalEnter a text value (wrap with quotes when needed).
Use SWITCH to return "A" when cell C2 (Score in column C) is 91, "B" when it is 82, otherwise "C".
| # | ALearner ID | BName | CScore | DResult |
|---|---|---|---|---|
| 2 | U001 | Tanaka | 82 | |
| 3 | U002 | Sato | 67 | |
| 4 | U003 | Suzuki | 91 | |
| 5 | U004 | Takahashi | 55 | |
| 6 | U005 | Ito | 78 | |
| 7 | ||||
| 8 |
How to Use (Formula)
=SWITCH(C2, 91, "A", 82, "B", "C")Result
B
Use SWITCH when you want to map values to different outputs. Enter Expression, Value 1, Result 1 in that order, then add optional arguments when needed.
Use the "Start Function Practice" button to jump straight into SWITCH drills.
The main arguments are Expression, Value 1, Result 1, Value 2, result2, default. Start with the required ones, then add optional arguments if needed.