Excel Function

SWITCH

Matches expression to values and returns mapped result.

SWITCH(expression, value1, result1, [default])

Arguments

expression

Required

Enter an expression such as comparison or calculation.

value1

Required

Enter a text value (wrap with quotes when needed).

result1

Required

Enter a text value (wrap with quotes when needed).

value2

Optional

Enter a text value (wrap with quotes when needed).

result2

Optional

Enter a text value (wrap with quotes when needed).

default

Optional

Enter a text value (wrap with quotes when needed).

Practice Preview

Use SWITCH to return "A" when cell C2 (Score in column C) is 91, "B" when it is 82, otherwise "C".

Example Table

#
ALearner ID
BName
CScore
DResult
2U001Tanaka82
3U002Sato67
4U003Suzuki91
5U004Takahashi55
6U005Ito78
7
8

How to Use (Formula)

=SWITCH(C2, 91, "A", 82, "B", "C")

Result

B

Practice This Function

SWITCH FAQ

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.

Where can I practice SWITCH?

Use the "Start Function Practice" button to jump straight into SWITCH drills.

What arguments does SWITCH use?

The main arguments are Expression, Value 1, Result 1, Value 2, result2, default. Start with the required ones, then add optional arguments if needed.