Syntax or pattern
Return different outputs based on one expression or status value.
=SWITCH(expression, case1, value1, [case2, value2], [default])5 practical examples
Use SWITCH to label overdue tasks
Create a simple status label based on a due date.
=IF(D2<TODAY(), "Overdue", "On track")Adjust the ranges, criteria and sheet names to match your workbook.
Use SWITCH for pass/fail logic
Classify scores, targets, or quality checks.
=IF(B2>=70, "Pass", "Review")Adjust the ranges, criteria and sheet names to match your workbook.
Use SWITCH for budget status
Compare actual spend to the planned amount.
=IF(C2>B2, "Over budget", "Within budget")Adjust the ranges, criteria and sheet names to match your workbook.
Use SWITCH for blank checks
Flag missing values before reports are shared.
=IF(A2="", "Missing", "Complete")Adjust the ranges, criteria and sheet names to match your workbook.
Use SWITCH for priority labels
Turn input values into clearer workflow labels.
=IF(E2="High", "Do first", "Normal")Adjust the ranges, criteria and sheet names to match your workbook.
Common mistakes to avoid
- Mixing text and numbers in comparisons.
- Forgetting quotation marks around text results.
- Creating nested formulas that are hard to audit.
FAQ
What is this Google Sheets page for?
This page gives copy-ready examples for switch examples so you can understand the pattern and adapt it to real spreadsheet work.
Can I copy these formulas directly?
Yes. Use the copy buttons, then adjust sheet names, ranges, criteria and column references for your own file.
Why does my formula return an error?
The most common causes are mismatched ranges, missing quotes around text criteria, blank source data, or references that do not match your sheet layout.
Here are some ideas for you
Optional resources that may help if you are learning Google Sheets, building trackers, creating dashboards or improving spreadsheet workflows.
- Google Sheets booksSee ideas
Learn formulas, workflows and dashboards with structured examples.
- Spreadsheet dashboard booksSee ideas
Improve how you design trackers, summaries and reporting sheets.
- Keyboard shortcut guidesSee ideas
Build speed with navigation, editing and formatting shortcuts.
- Numeric keypadsSee ideas
Useful if you enter numbers often on a laptop or compact keyboard.
- External monitorsSee ideas
Helpful for viewing data, formulas and dashboards side by side.
- Desk notebooksSee ideas
Sketch formulas, tracker layouts and reporting ideas before building.
Some links in this section may be affiliate links. Choose only what is useful for your own work.