Pinterest Pixel

SWITCH Formula in Excel

Bryan
 .

 

Want to know How To Master the SWITCH Function in Excel?

*** Watch our video and step by step guide below with free downloadable Excel workbook to practice ***

Watch on YouTube and give it a thumbs up 👍

SWITCH Formula in Excel | MyExcelOnline

What does it do?

Matches multiple values and returns the first value that has a match

Formula breakdown:

=SWITCH(expression, value1, result1, [value2 / default, result2], …)

What it means:

=SWITCH(value to check, value to match against, result to return, [succeeding values to match or the default value if nothing gets matched], …)


If you have multiple values to check, we can use Excel’s SWITCH Formula! It allows us to specify multiple values to check, then the SWITCH Formula will look for the first value that gets matched!

Let us try it out on a simple ratings table (e.g. 1 = Bad, 2 = Average, 3 = Great), then we will create a SWITCH Formula that will simulate the exact same logic of the table!

I explain how you can do this below:

Download excel workbookSWITCH-FORMULA.xlsx

STEP 1: We need to enter the SWITCH function in a blank cell:

=SWITCH(

SWITCH Formula in Excel

 

STEP 2: The SWITCH arguments:

expression

What is the value to check?

Select the cell containing the rating that you want to translate to the correct description

=SWITCH(G8, 

SWITCH Formula in Excel

value1, result1

What is the first lookup value and value to return if it is matched?

Let us start from the first value of the rating table. If the value is 1, then the description is “Bad”

=SWITCH(G8, 1, “Bad”

SWITCH Formula in Excel

value2, result2

What is the second lookup value and value to return if it is matched?

Let us start from the second value of the rating table. If the value is 2, then the description is “Average”

=SWITCH(G8, 1, “Bad”, 2, “Average”,

SWITCH Formula in Excel

value3, result3

What is the third lookup value and value to return if it is matched?

Let us start from the third value of the rating table. If the value is 3, then the description is “Great”

=SWITCH(G8, 1, “Bad”, 2, “Average”, 3, “Great”,

SWITCH Formula in Excel

 

default

What is the default value to return if nothing gets matched?

We want to show the value “Unknown”, if an unknown rating is specified.

=SWITCH(G8, 1, “Bad”, 2, “Average”, 3, “Great”, “Unknown”)

SWITCH Formula in Excel

You now have your correct rating description!

SWITCH Formula in Excel

Let us try an unknown rating (40) and see the resulting description:

SWITCH Formula in Excel

 

SWITCH Formula in Excel | MyExcelOnline

 

If you like this Excel tip, please share it



SWITCH Formula in Excel | MyExcelOnline


Bryan

Bryan Hong is an IT Software Developer for more than 10 years and has the following certifications: Microsoft Certified Professional Developer (MCPD): Web Developer, Microsoft Certified Technology Specialist (MCTS): Windows Applications, Microsoft Certified Systems Engineer (MCSE) and Microsoft Certified Systems Administrator (MCSA).

He is also an Amazon #1 bestselling author of 4 Microsoft Excel books and a teacher of Microsoft Excel & Office at the MyExecelOnline Academy Online Course.

See also  LOWER Formula in Excel

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...