Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
SWITCH. SWITCH compares one value with a list of options and returns the result paired with the first match. A last lone argument is the default for anything that doesn’t match. Use it when you test the same cell against fixed values.
=SWITCH(B2,"Mon",1,"Tue",2,0) day name to number, 0 otherwise
Marcus Hill is checking September commission for the South team. Sales reps earn 5% of an order, partners earn 8%, and website orders earn nothing.
In D2:D13, work out the commission on each order: 5% of the value for "Sales Rep", 8% for "Partner", and 0 for "Online". Round to 2 decimals.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Order | Channel | Value | Commission | ||||
| 2 | 50736 | Online | $255.88 | |||||
| 3 | 50738 | Partner | $612.75 | |||||
| 4 | 50739 | Online | $280.30 | |||||
| 5 | 50741 | Online | $203.78 | |||||
| 6 | 50746 | Sales Rep | $946.65 | |||||
| 7 | 50747 | Sales Rep | $145.34 | |||||
| 8 | 50752 | Partner | $110.00 | |||||
| 9 | 50757 | Partner | $424.13 | |||||
| 10 | 50758 | Online | $332.50 | |||||
| 11 | 50765 | Online | $144.53 | |||||
| 12 | 50774 | Online | $142.80 | |||||
| 13 | 50781 | Online | $182.00 | |||||
| 14 | ||||||||
| 15 | ||||||||
| 16 |
=IF(B2>=1.5,SUM(C2:C9),0)Language
Full plan
Excel ✓ · SQL and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe