The SWITCH function compares one value against a list of values and returns the result corresponding to the first match. If no match is found, it can return a default value.
Where: - expression: the value to compare - value1, value2, ...: values to match - result1, result2, ...: results to return for each match - default: optional value if no match is found
Click to reveal answer
beginner
What happens if the SWITCH function does not find any matching value and no default is provided?
If no match is found and no default value is given, SWITCH returns the #N/A error.
Click to reveal answer
intermediate
How can SWITCH function be useful in grading student scores?
You can use SWITCH to assign letter grades based on score categories by matching score ranges or exact values to grades like A, B, C, etc., making grading easier and clearer.
Click to reveal answer
intermediate
Can SWITCH function handle multiple conditions like IF statements?
Yes, SWITCH can handle multiple conditions but only compares one expression to multiple values. For complex conditions involving different expressions, nested IFs or IFS function may be better.
Click to reveal answer
What is the first argument in the SWITCH function?
AA list of values
BThe default result
CThe value to compare
DThe first result to return
✗ Incorrect
The first argument is the expression or value that SWITCH compares against the list of values.
What does SWITCH return if no match is found and no default is given?
A0
B#N/A error
CEmpty string
DThe first result
✗ Incorrect
Without a default, SWITCH returns the #N/A error when no match is found.
Which of these is a correct use of SWITCH to return 'Yes' if A1 is 1, 'No' if 0, else 'Maybe'?
ASWITCH(1, A1, "Yes", 0, "No", "Maybe")
BSWITCH(A1, "Yes", 1, "No", 0, "Maybe")
CSWITCH(A1, "Yes", "No", "Maybe")
DSWITCH(A1, 1, "Yes", 0, "No", "Maybe")
✗ Incorrect
The syntax is SWITCH(expression, value1, result1, value2, result2, ..., default). Option D follows this correctly.
Can SWITCH function replace nested IF statements for multiple exact matches?
AYes, it is simpler for exact matches
BNo, SWITCH only works for numbers
CNo, SWITCH only works for text
DYes, but only for two conditions
✗ Incorrect
SWITCH is designed to simplify multiple exact match conditions compared to nested IFs.
Which function is better than SWITCH for multiple different conditions involving different expressions?
AIFS function
BSUM function
CVLOOKUP function
DCOUNT function
✗ Incorrect
IFS allows multiple conditions with different expressions, which SWITCH cannot handle.
Explain how the SWITCH function works and give a simple example.
Think about comparing one value to many options and returning a matching answer.
You got /5 concepts.
Describe a real-life situation where using SWITCH function can make your spreadsheet easier to read and maintain.
Consider situations where you assign labels based on exact values.
You got /4 concepts.
Practice
(1/5)
1. What does the SWITCH function do in Excel?
easy
A. It sorts data alphabetically.
B. It adds numbers in a range.
C. It selects a value from multiple options based on a single expression.
D. It counts the number of cells with text.
Solution
Step 1: Understand the purpose of SWITCH
The SWITCH function evaluates one expression and compares it to a list of values.
Step 2: Identify what SWITCH returns
It returns the result corresponding to the first matching value or a default if no match is found.
Final Answer:
It selects a value from multiple options based on a single expression. -> Option C
Quick Check:
SWITCH chooses from options based on one value [OK]
Hint: SWITCH picks one result from many choices based on one value [OK]
Common Mistakes:
Confusing SWITCH with SUM or COUNT functions
Thinking SWITCH sorts data
Believing SWITCH counts text cells
2. Which of these is the correct syntax for the SWITCH function in Excel?
easy
A. SWITCH(expression, value1, result1, [value2, result2], ..., [default])
B. SWITCH(expression; value1; result1; [value2; result2]; ...; [default])
C. SWITCH(expression, [value1, result1], [value2, result2], ..., default)
D. SWITCH(expression: value1: result1: value2: result2: default)
Solution
Step 1: Recall Excel function syntax
Excel functions use commas to separate arguments, not semicolons or colons.
Step 2: Match the correct SWITCH syntax
The correct syntax is SWITCH(expression, value1, result1, [value2, result2], ..., [default]).
Final Answer:
SWITCH(expression, value1, result1, [value2, result2], ..., [default]) -> Option A
Quick Check:
Commas separate SWITCH arguments in Excel [OK]
Hint: Remember: Excel uses commas, not semicolons or colons [OK]
Common Mistakes:
Using semicolons or colons instead of commas
Placing default value without commas
Using brackets incorrectly around arguments
3. What is the result of this formula? =SWITCH(3, 1, "One", 2, "Two", 3, "Three", "Other")
medium
A. "One"
B. "Two"
C. "Other"
D. "Three"
Solution
Step 1: Identify the expression value
The expression is 3, so SWITCH looks for value 3 in the list.
Step 2: Find matching value and return result
Value 3 matches the third pair, so it returns "Three".
Final Answer:
"Three" -> Option D
Quick Check:
Expression 3 matches value 3, returns "Three" [OK]
Hint: Match expression to value pairs in order to find result [OK]
Common Mistakes:
Choosing default result instead of matching value
Confusing value and result pairs order
Ignoring the expression value
4. Identify the error in this formula: =SWITCH(A1, 1, "One", 2, "Two", 3, "Three") Assume A1 contains 4.
medium
A. Missing default value causes #N/A error when no match found.
B. Syntax error due to missing commas.
C. Incorrect use of quotes around numbers.
D. SWITCH cannot handle numeric values.
Solution
Step 1: Check for default value in SWITCH
The formula lacks a default result for unmatched values.
Step 2: Understand behavior when no match found
Since A1 is 4 and no match exists, SWITCH returns #N/A error without default.
Final Answer:
Missing default value causes #N/A error when no match found. -> Option A
Quick Check:
Always add default to avoid errors [OK]
Hint: Always add a default result to SWITCH to prevent errors [OK]
Common Mistakes:
Forgetting default value causes #N/A error
Thinking SWITCH needs quotes around numbers
Assuming SWITCH can't handle numbers
5. You want to assign letter grades based on scores in cell B2: 90+ = "A", 80-89 = "B", 70-79 = "C", 60-69 = "D", below 60 = "F". Which SWITCH formula correctly assigns these grades?