SWITCH Function in Excel: Syntax, Examples and Free Practice
SWITCH is an Excel Logic function. Compares one value against a list of options and returns a matching result.
SWITCH syntax
Arguments
expression: The value being compared against each casevalue1: The first valueresult1: The value to return when a case matchesdefault: The value to use if nothing else matches (optional)
When to use SWITCH
SWITCH is used to build decision rules directly into a spreadsheet instead of manually judging each row.
Practice SWITCH online, free
Open the live Excel-style spreadsheet and try SWITCH yourself. No Excel install or sign-up needed to start.
Practice SWITCH now →More Logic functions
Frequently asked questions
What does the SWITCH function do in Excel?
Compares one value against a list of options and returns a matching result.
What is the syntax of SWITCH in Excel?
The syntax is =SWITCH(expression, value1, result1, [default]). expression: The value being compared against each case; value1: The first value; result1: The value to return when a case matches; default: The value to use if nothing else matches (optional).
Where can I practice SWITCH online for free?
Open the free live spreadsheet on Cellgrids and try SWITCH yourself. No Excel install is needed and you can start without signing up.
All Excel formulas · Cheat sheet · Excel exercises · Logic functions · Excel case studies · Excel tutorials · Excel shortcuts