Check code length with LEN
Use LEN to validate that product codes are the right length.
LEN
Real situations from working spreadsheets — sales targets, commission tiers, messy exports, aged invoices. Numbered in recommended order: start at 1 and work down, or filter to what you need.
9 exercises — for Data Analyst
Use LEN to validate that product codes are the right length.
LEN
Pull the first name out of a single full-name column.
LEFT · FIND
Extract characters from the middle of a text value.
MID
Clean inconsistent spacing and casing so values can be matched.
Match a customer ID against a reference table to return their region.
XLOOKUP
Combine INDEX and MATCH to look up a value without a fixed column number.
INDEX · MATCH
Return a readable message instead of #N/A when a lookup finds nothing.
XLOOKUP
Use absolute references so a lookup does not break when copied down a column.
XLOOKUP
Use COUNTIF to reconcile two lists and spot what is absent.
COUNTIF · IF
| # | Exercise | Functions | Difficulty | Time | Status |
|---|---|---|---|---|---|
| 2 | Check code length with LENHarbor Supply — product code import | LEN | Beginner | 3 min | 10 pts |
| 3 | Split a full name with LEFT and FINDHarbor Supply — CRM contact export | LEFT · FIND | Beginner | 7 min | 15 pts |
| 15 | Pull the year out of an order code with MIDHarbor Supply — order codes | MID | Intermediate | 7 min | 25 pts |
| 16 | Standardise messy codes with TRIM and UPPERHarbor Supply — supplier feed, uncleaned | — | Intermediate | 7 min | 25 pts |
| 21 | Look up a customer's region with XLOOKUPHarbor Supply — orders plus a customer reference table | XLOOKUP | Intermediate | 8 min | 25 pts |
| 24 | Find a value with INDEX and MATCHHarbor Supply — commission rates by rep | INDEX · MATCH | Intermediate | 10 min | 25 pts |
| 27 | Handle missing lookups gracefullyHarbor Supply — orders including a new customer | XLOOKUP | Advanced | 10 min | 40 pts |
| 28 | Lock ranges so a lookup survives fill-downHarbor Supply — orders and customer reference | XLOOKUP | Advanced | 12 min | 40 pts |
| 29 | Find which customers are missing from a listHarbor Supply — CRM customers versus billing records | COUNTIF · IF | Advanced | 14 min | 40 pts |