Formulas > =SWITCH()

How To Use SWITCH() Function in Google Sheets

Description

Tests an expression against a list of cases and returns the corresponding value of the first matching case, with an optional default value if nothing else is met.

How To Actually Use SWITCH() in Sheets

SWITCH(expression, case1, value1, [default or case2, value2], …)

Try SWITCH yourself

In cells A1:A10, you have scores ranging from 1 to 5. Use the SWITCH formula in cell B1 to categorize these scores as 'Poor', 'Average', 'Good', 'Very Good', or 'Excellent'.

Hints (3)

7 Better Sheets Tutorials

Build a Domain Grader

Build a Domain Grader

Create a way to grade the quality of a domain based on many different votes and inputs and qualities. Like measuring the length and ranking the results.
ARRAYFORMULA() CONCAT() COUNTA() COUNTIF() LEN() +1 more
Switch Data

Switch Data

We're going through the switch formula because in the past if I've ever had to change, say a day of the week or a month on the calendar to a number, or I have to change that number to the month or text, it's really hard.
SWITCH() VLOOKUP()
Ken Asks: Can We Add Star Ratings?

Ken Asks: Can We Add Star Ratings?

One common feature that users often request is the ability to add star ratings to their spreadsheets. While this feature is not built into Google Sheets, it is possible to create a star rating system using emojis and data validation.
AVERAGE() SWITCH() VLOOKUP()
5 Ways to use IF() Formula to Create Magic in Your Sheets

5 Ways to use IF() Formula to Create Magic in Your Sheets

We're going to create some magic here. Some if magic, sprinkle a little magic on your sheets, you can use these formulas in existing sheets.
AND() IF() IFS() ISBLANK() OR() +1 more
Building a Year Progress Clone

Building a Year Progress Clone

Create a year progress bar to see how much of the year is gone. Great motivational chart to watch count up to 100%.
EOMONTH() HOUR() MONTH() NOW() SPARKLINE() +3 more
That Viral Growing Plant Progress Chart

That Viral Growing Plant Progress Chart

Create a growing flower pot from checkboxes with this bountiful formula combination. Members get free access to the sheet in the video.
COUNTIF() IMAGE() SWITCH()
Create a ChatGPT Cheat Sheet Spreadsheet

Create a ChatGPT Cheat Sheet Spreadsheet

Walk through step-by-step going from a blank sheet to an AI powered prompt engineering cheat sheet of a spreadsheet.

Watch the Upgrade to GPT-4 video to see the differences between GPT-3 and GPT-4 Apps Script

CONCATENATE() COUNTIF() IF() ISBLANK() LEN() +2 more

Learn more about the SWITCH() formula:

Generate a SWITCH() formula for your needs

Describe your task in plain English and get a paste-ready formula that uses SWITCH(). 2 free AI generations, no signup. Members get unlimited use.

Generate a SWITCH() formula