Challenge - 5 Problems
SWITCH Function Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate1:30remaining
Output of SWITCH with matching case
What is the output of this formula in Google Sheets?
=SWITCH(3, 1, "One", 2, "Two", 3, "Three", "Other")Google Sheets
=SWITCH(3, 1, "One", 2, "Two", 3, "Three", "Other")
Attempts:
2 left
💡 Hint
Look for the value that matches the first argument exactly.
✗ Incorrect
The SWITCH function compares the first argument (3) to each case (1, 2, 3). When it finds 3, it returns the corresponding value "Three".
📊 Formula Result
intermediate1:30remaining
Output when no match and default provided
What does this formula return?
=SWITCH("apple", "banana", "Yellow", "orange", "Orange", "Unknown")Google Sheets
=SWITCH("apple", "banana", "Yellow", "orange", "Orange", "Unknown")
Attempts:
2 left
💡 Hint
Check if the first argument matches any case. If not, the default is returned.
✗ Incorrect
Since "apple" does not match "banana" or "orange", the default value "Unknown" is returned.
❓ Function Choice
advanced2:00remaining
Choosing the right function for multiple conditions
You want to assign a grade based on a score:
- 90 or above: "A"
- 80 to 89: "B"
- 70 to 79: "C"
- Below 70: "F"
Which formula using SWITCH will correctly assign the grade for a score in cell A1?
- 90 or above: "A"
- 80 to 89: "B"
- 70 to 79: "C"
- Below 70: "F"
Which formula using SWITCH will correctly assign the grade for a score in cell A1?
Attempts:
2 left
💡 Hint
Use SWITCH with TRUE as the first argument to evaluate conditions.
✗ Incorrect
Using SWITCH(TRUE, ...) lets you test multiple conditions in order. The first TRUE condition returns its value.
🎯 Scenario
advanced2:00remaining
Using SWITCH to categorize weekdays
You have a cell B2 containing a weekday name (e.g., "Monday", "Tuesday", etc.).
Which formula using SWITCH will return "Weekday" for Monday to Friday and "Weekend" for Saturday and Sunday?
Which formula using SWITCH will return "Weekday" for Monday to Friday and "Weekend" for Saturday and Sunday?
Attempts:
2 left
💡 Hint
Make sure all days are covered with correct labels and a default value.
✗ Incorrect
Option C correctly maps weekdays and weekends and provides a default "Unknown" for any other input.
❓ data_analysis
expert2:30remaining
Count how many times SWITCH returns a specific value
You have a list of fruit names in column A (A2:A10). You use this formula in column B to categorize fruits:
Which formula will correctly count how many fruits are categorized as "Yellow" in column B?
=SWITCH(A2, "apple", "Red", "banana", "Yellow", "grape", "Purple", "Other")Which formula will correctly count how many fruits are categorized as "Yellow" in column B?
Attempts:
2 left
💡 Hint
Count the occurrences of the category in the column where SWITCH results are stored.
✗ Incorrect
Column B contains the categories (like "Yellow"), so counting "Yellow" in B2:B10 gives the correct count.