Exercises / Logic and decisions · 7 of 9
Turn codes into names with SWITCH
SWITCH(value, match1, result1, match2, result2, …, default) compares one value against a list of exact matches. The last, unpaired argument is the default when nothing matches.
Your taskIn C2, use SWITCH to turn the region code in B2 into its name: "N" is North, "S" is South, "E" is East, "W" is West, anything else is "Unknown". It will be copied down to C8.
Pro
Unlock this exercise and every module after the basics.
Pro opens every exercise in every module, your review schedule, and the final test for the course certificate.
| Row | A | B | C |
|---|---|---|---|
| 1 | Store | Code | Region |
| 2 | Store 01 | N | |
| 3 | Store 02 | E | |
| 4 | Store 03 | S | |
| 5 | Store 04 | N | |
| 6 | Store 05 | X | |
| 7 | Store 06 | W | |
| 8 | Store 07 | S |