Level 2LookupsPractice, 2 min
XLOOKUP with a fallback
The task
Checkout looks up the discount for the promo code in E2. That code isn't in the list. In F2, use
XLOOKUP so a missing code returns 0 instead of an error.The data
The starting sheet. Cells outlined in green are where your formulas go.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Code | Discount | Code entered | Discount | ||
| 2 | WELCOME10 | 10% | SPRING30 | |||
| 3 | FALL15 | 15% | ||||
| 4 | VIP20 | 20% | ||||
| 5 | FREESHIP | 5% | ||||
| 6 | BUNDLE25 | 25% |