All 10 SWITCH and IS Functions exercises
1
Region Code to Name
Free
A2 holds a one-letter region code: N, S, E or W. Write a formula in B2 that returns the full region name using SWITCH.
Show the solution
SWITCH takes the value, then value/result pairs. Use =SWITCH(A2,"N","North","S","South","E","East","W","West")
Right — SWITCH lists each value and its result, which reads more easily than four nested IFs.
Expected result in B2: South
Try it in the live spreadsheet →
2
Add a Default
Free
A2 holds a finishing place. Write a formula in B2 that returns Gold, Silver or Bronze for places 1 to 3, and 'No medal' for anything else.
Show the solution
Put the default result last, on its own. Use =SWITCH(A2,1,"Gold",2,"Silver",3,"Bronze","No medal")
Good — a last argument with no pair is SWITCH's default.
Expected result in B2: No medal
Try it in the live spreadsheet →
3
Priority Label
Free
A2 holds a ticket priority from 1 to 3. Write a formula in B2 that returns Urgent for 1, High for 2 and Normal for 3.
Show the solution
Pair each number with its label. Use =SWITCH(A2,1,"Urgent",2,"High",3,"Normal")
Right — one SWITCH replaces a chain of IFs.
Expected result in B2: High
Try it in the live spreadsheet →
4
Bands With SWITCH(TRUE)
A2 holds a score. Write a formula in B2 using SWITCH that returns High for 80 and above, Medium for 50 to 79, and Low otherwise.
Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).
Try it in the live spreadsheet →
5
Is It a Number?
A2 holds a value from an import. Write a formula in B2 that returns 'Number' if it is a number, otherwise 'Not a number'.
Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).
Try it in the live spreadsheet →
6
Spot a Number Stored as Text
A2 looks like 1200, but it came from a CSV file. Write a formula in B2 that returns 'Text' if A2 is stored as text, otherwise 'Number'.
Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).
Try it in the live spreadsheet →
7
Divide Only When You Can
A2 holds a total cost and B2 the number of units, which sometimes says 'n/a'. Write a formula in C2 that divides A2 by B2 when B2 is a number, otherwise returns 'Check B2'.
| A | B | C |
|---|
| 1 | Total | Units | Per unit |
|---|
| 2 | 900 | n/a | ? |
|---|
Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).
Try it in the live spreadsheet →
8
Does the Name Contain Ltd?
A2 holds a customer name. Write a formula in B2 that returns 'Company' if the name contains 'Ltd', otherwise 'Person'.
| A | B |
|---|
| 1 | Customer | Type |
|---|
| 2 | Tan Brothers Pte Ltd | ? |
|---|
Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).
Try it in the live spreadsheet →
9
Is the Code on the Approved List?
A2 holds an item code and D2:D5 the approved list. Write a formula in B2 that returns 'Approved' if the code is on the list, otherwise 'Not approved'.
| A | B | C | D |
|---|
| 1 | Item | Status | | Approved |
|---|
| 2 | SKU-207 | ? | | SKU-101 |
|---|
| 3 | | | | SKU-207 |
|---|
| 4 | | | | SKU-310 |
|---|
| 5 | | | | SKU-415 |
|---|
Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).
Try it in the live spreadsheet →
10
Day Type From WEEKDAY
A2 holds a date. Write a formula in B2 using SWITCH and WEEKDAY (Monday as 1) that returns Saturday, Sunday, or Weekday.
Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).
Try it in the live spreadsheet →