Excel SWITCH Function
Chala mitrano — today SWITCH. One expression, many exact matches — cleaner than a tower of IF for codes.
चला मित्रांनो — आज SWITCH. एक expression, अनेक exact matches — code साठी IF टॉवरपेक्षा स्वच्छ.
चलो दोस्तों — आज SWITCH. एक expression, कई exact matches — codes के लिए IF टॉवर से साफ़.
Purpose
Match an expression against a list of values and return the paired result.
Return value
The matching result, or default.
Syntax
Arguments
| Argument | Required? | Description |
|---|---|---|
expression | Required | The value to match (cell or formula). |
value1, result1, … | Required | Pairs of match → result. |
default | Optional | Result when nothing matches. |
Version
Excel 2019 / Microsoft 365. LibreOffice: nested IF / IFS fallback.
How to use — Why → What → How
Why: Status codes map to labels. SWITCH reads clearer than nested IF for exact equals. Status codes in Kochi ERP and Seattle SaaS. Mixed ₹ and $. In Indian back offices and foreign sister teams, SWITCH shows up on approval, SLA and fee sheets every week.
What: SWITCH compares expression to each value with exact match; first hit wins; optional default at end. Read every argument in the table once before you type; each one changes the answer on purpose.
How — numbered steps:
- Type =SWITCH(A2,1,"New",2,"Open",3,"Closed","?") .
- Keep codes and labels paired.
- Add default.
Ravindra Bagale's Tip
Friends, after SWITCH, find one IF/logic cell in a real workbook this week that this lesson improves.
Ravindra Bagale's Tip – मराठी
मित्रांनो, SWITCH नंतर या आठवड्यात खरी workbook मधील एक logic cell सुधारा.
Ravindra Bagale's Tip – हिंदी
दोस्तों, SWITCH के बाद इस हफ़्ते असली workbook की एक logic cell सुधारो.
Ravindra Bagale's Tip
Friends, sleep on SWITCH; rebuild example 1 tomorrow without looking.
Ravindra Bagale's Tip – मराठी
मित्रांनो, SWITCH वर झोपा; उद्या उदाहरण 1 न पाहता लिहा.
Ravindra Bagale's Tip – हिंदी
दोस्तों, SWITCH पर सोकर कल उदाहरण 1 बिना देखे लिखो.
Ravindra Bagale's Tip
Friends, say the business rule in plain words before =SWITCH.
Ravindra Bagale's Tip – मराठी
मित्रांनो, =SWITCH आधी नियम साध्या शब्दांत सांगा.
Ravindra Bagale's Tip – हिंदी
दोस्तों, =SWITCH से पहले नियम सादे शब्दों में बोलो.
Ravindra Bagale's Tip
Friends, after you finish SWITCH, open yesterday’s real workbook and find one place this function would have saved ten minutes.
Ravindra Bagale's Tip – मराठी
मित्रांनो, SWITCH नंतर कालची खरी वर्कबुक उघडा आणि शोधा जिथे हे फंक्शन दहा मिनिटे वाचवू शकले असते.
Ravindra Bagale's Tip – हिंदी
दोस्तों, SWITCH के बाद कल की असली वर्कबुक खोलो और ढूँढो जहाँ यह फ़ंक्शन दस मिनट बचा सकता था.
Ravindra Bagale's Tip
Friends, treat SWITCH like a seatbelt on logic columns — use it before a manager asks why the flag is wrong.
Ravindra Bagale's Tip – मराठी
मित्रांनो, SWITCH ला logic columns वरील seatbelt समजा.
Ravindra Bagale's Tip – हिंदी
दोस्तों, SWITCH को logic columns पर seatbelt समझो.
Download practice file: practice-switch.xlsx (includes sheet About this data, practice sheets, and Answers).
Worked examples
1) Status map
Kochi ERP.
| Code | ₹ |
|---|---|
| 2 | 500 |
Result: Open
What it means: 2 → Open.
2) Default
Unknown.
| Code |
|---|
| 9 |
Result: ?
What it means: Default fires.
3) Seattle $
Plan.
| Plan |
|---|
| Pro |
Result: 29
What it means: Text matches.
4) vs IFS
Same idea.
| Code |
|---|
| 3 |
Result: Closed
What it means: IFS needs tests; SWITCH matches values.
5) WEEKDAY map
Mon label.
| Date |
|---|
| 2026-10-26 |
Result: Mon
What it means: Expression can be a formula.
6) No default #N/A
Risk.
| Code |
|---|
| 9 |
Result: #N/A
What it means: Always add default for reports.
Common errors and fixes
Notes and tips
- Revisit SWITCH errors after the quiz.
- Build one example from memory.
- Check types if results look wrong.
- Teach a tip in Marathi or Hindi.
- Keep currency consistent in one column (practice mixes ₹ $ £ €).
- Drill: status code map with default from memory.
- SWITCH vs IFS: exact value map vs ordered condition tests.
- Fictional sample data only.
- Print the SWITCH revision card.
- Ask juniors to predict before Enter.
- Track your top mistake monthly.
- Status codes in Kochi ERP and Seattle SaaS. Mixed ₹ and $.
- Logical tests love TRIM and UPPER when text is messy.
- Interview tip: explain the business rule before the formula.
- When nesting, keep each IF on its own mental line — or switch to IFS/SWITCH.
- Classroom drill: invent three brand-new formulas from your city without the page open.
- Share one tip with a classmate — teaching locks the idea.
- If a result looks wrong, check blanks vs zeros before rewriting logic.
- Print the revision card for SWITCH for one week of real worksheets.
- When helping a junior, ask them to predict before Enter.
- Share one tip with a classmate in Marathi or Hindi.
- Keep currency symbols consistent inside a single report column.
- When Excel versions differ, write a nested-IF fallback under IFS/SWITCH in a comment.
- Logical tests love TRIM and UPPER when text is messy.
- Interview tip: explain the business rule before the formula.
In real work
Drill: status code map with default from memory. Status codes in Kochi ERP and Seattle SaaS. Mixed ₹ and $. Classroom drill: write three brand-new SWITCH formulas on a blank sheet using names from your own city — if you can invent them without the page open, you own the skill. Then break one formula on purpose and watch the error; recovering from that break is half of interview readiness. Always verify with a known case before trusting a long chain of logical tests. Keep a personal notebook of the one mistake you make most often with this function; review it monthly.
How it compares
SWITCH vs IFS: exact value map vs ordered condition tests.
Interview corner
- SWITCH vs IFS?
- Exact values vs conditions.
- Default?
- Last argument.
- Old Excel?
- Nested IF.
Related functions
Practice tasks (10)
- Task 1. Map codes 1/2/3.SWITCH.
- Task 2. Add default.Default.
- Task 3. Text plan prices.Text.
- Task 4. WEEKDAY labels.Expr.
- Task 5. Show #N/A without default.Risk.
- Task 6. Compare IFS.Interview.
- Task 7. Fill column.Fill.
- Task 8. Doc code list.Note.
- Task 9. Teach.Teach.
- Task 10. Bonus: CHOOSE index.Related.
Quick quiz
Answers: Q1=Exact values, Q2=#N/A, Q3=Values vs conditions, Q4=Cell or formula, Q5=Nested IF (check after you try).
Revision card
Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.