Module 5 · Logical
Zone codes

Every crew member gets a wristband with a zone code and a day number. Nobody remembers what the codes mean. Priya answers the same question all day. You translate the codes with SWITCH.
Steps
Translate a code with SWITCH
SWITCH compares a value with a list of values. It gives back the result of the first match.
How to do it
- Select the cell for the result.
- Type =SWITCH(
- Type the cell with the value and a comma.
- Type a pair: the match and the result. Type a comma.
- Type the other pairs and a closing bracket.
- Press Enter.
=SWITCH(C5,"A","Backstage","B","Main stage","C","Camping")Task: Translate the other codes. Fill in D6:D12.
Add a default value
The last value of SWITCH can be a default. SWITCH gives it back if no value matches.
How to do it
- Click cell F5.
- Type SWITCH with the value and the pairs. Type a comma.
- Type the default value and a closing bracket.
- Press Enter.
- Without a default, SWITCH gives #N/A if no value matches.
=SWITCH(E5,1,"Friday",2,"Saturday",3,"Sunday","All days")Task: Translate the other day numbers. Fill in F6:F12.