SWITCH

Matches a value against a list, and returns the paired result.

How it’s written

SWITCH(value, match1, result1, default)

Example

A
1Code
2W
=SWITCH(A2,"O","Open","W","Waiting","Unknown")

Result: Waiting

W matches the second pair.

Try it yourself

Open a live sheet with this example, and type the formula yourself. It takes a moment to load.

Worth knowing

Much easier to read than nested IFs when you’re matching exact values.

Practice it properly

Many outcomes with IFS and SWITCH gives you real tasks, with your formulas tested on data you haven’t seen.

Start the lesson

Related functions