Excel practice › Sample data › Messy customer list, to clean
Messy Excel data for cleaning practice, with the cleaned version
A customer list in the state lists usually arrive in: typed by several people, pasted from several places. It has 69 rows for 60 customers. The names and emails are invented and every address ends in example.com.
The workbook has two sheets: Messy, to clean, and Clean, the same list finished, so you can compare. Eight tasks with answers are below and in the file.
What's in the file
| Column | Type | Values |
|---|---|---|
| Customer ID | Text | C-2001 to C-2060. 6 of them appear twice |
| Name | Text | Spaces before, after and between the names; ALL CAPITALS or all lowercase on some rows |
| Text | Capital letters on some rows, a space before or after on others | |
| State | Text | Lowercase on some rows, a space before or after on others |
| Signup Date | Date | Real dates, nothing to fix |
| Amount | Number or text | Half are numbers; the rest are text like "$1,250.00" or "$ 1,250.00" |
Also in the list: 3 completely blank rows, 6 customers entered twice.
The first rows of the Messy sheet
| Customer ID | Name | State | Signup Date | Amount | |
|---|---|---|---|---|---|
| C-2001 | Karin Fontaine | karin.fontaine@example.com | IL | 12/19/2025 | 719 |
| C-2002 | Ines Grieve | INES.GRIEVE@EXAMPLE.COM | wa | 8/22/2025 | $1,474.99 |
| C-2003 | GRETA PETROV | greta.petrov@example.com | CA | 11/18/2025 | 292 |
| C-2004 | Edith Corvin | edith.corvin@example.com | CA | 3/6/2025 | $ 1,108.50 |
| C-2005 | lars jovanic | Lars.jovanic@example.com | ny | 12/4/2025 | 2057 |
| C-2006 | Nils Nyberg | nils.nyberg@example.com | CO | 4/1/2025 | $2,390.00 |
| C-2007 | JONAS MOREAU | jonas.moreau@example.com | fl | 10/21/2025 | 1485.99 |
| C-2008 | Edith Tanaka | EDITH.TANAKA@EXAMPLE.COM | TX | 12/11/2025 | $ 1,851.00 |
8 things to do with it, with answers
Try each one in the file first, then open the answer. Every number below was computed from the rows in the file.
1. Names have extra spaces and mixed capitals. Write a formula that turns each one into a clean name (one space, first letters capitalized).
" Ines Grieve" in B3 becomes "Ines Grieve"
On the Messy sheet: =PROPER(TRIM(B3))
TRIM removes the spaces at both ends and the extra ones between words; PROPER fixes the capitals. The same formula turns "GRETA PETROV" in B4 into "Greta Petrov".
2. Emails should be lowercase with no spaces around them.
"INES.GRIEVE@EXAMPLE.COM" in C3 becomes "ines.grieve@example.com"
On the Messy sheet: =LOWER(TRIM(C3))
3. States should be two capital letters.
"wa" in D3 becomes "WA"
On the Messy sheet: =UPPER(TRIM(D3))
4. Some amounts are text with a dollar sign and commas, so they don't add up. Turn every amount into a number.
"$1,474.99" in F3 becomes 1474.99
On the Messy sheet: =VALUE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(F3,"$",""),",","")," ",""))
Each SUBSTITUTE removes one character: the dollar sign, the commas, the space after the dollar sign. VALUE turns the text that is left into a number.
5. Some customers were entered twice. How many customer IDs appear more than once, and which?
6: C-2004, C-2012, C-2020, C-2028, C-2039, C-2053
On the Messy sheet: =COUNTIF($A$2:$A$70,A2)
Fill that formula down a spare column: it shows 2 on both rows of a repeated ID and 1 on the rest (0 on a blank row).
6. How many rows are completely blank?
3
On the Messy sheet: =COUNTBLANK(A2:A70)
Every real row has a Customer ID, so counting the blanks in column A counts the blank rows.
7. After removing the duplicates and the blank rows: how many customers are there, and what do their amounts add up to?
60 customers, $67,531.15
=SUM(Clean!F2:F61)
The Clean sheet in the workbook is the finished list, to compare your result with.
8. On the cleaned list: how many customers per state?
Rows: State. Values: Count of Customer ID. (Or one COUNTIF per state.)
| State | Customers |
|---|---|
| TX | 7 |
| CA | 10 |
| NY | 6 |
| FL | 9 |
| IL | 5 |
| WA | 9 |
| CO | 8 |
| GA | 6 |
| Total | 60 |
Practice the same skills in the browser
These pages have short exercises on small tables, checked as you type:
- TRIM, with live examples
- LEFT, RIGHT and MID
- Joining text
- COUNTIF
- The #VALUE! error
- VLOOKUP not working: 8 causes
More files: Sales orders (500 rows), Employee list (200 rows), and the practice workbooks with exercises on one function each.