Cleaning messy data in Excel: lessons and a project
For anyone who has been sent a download that isn't fit to use: spaces after names, capitals all over the place, dates that won't sort. You'll tidy text with TRIM, PROPER and SUBSTITUTE, split and join names, turn text into real dates and numbers, and find duplicates. The project is a conference booking export to tidy before the name badges are printed.
8 lessons38 exercises24 Check questions1 free lessona project in Excel3 suggested CPD hours
In C2, join the first name and surname with a space between them.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | First name | Surname | Full name | Initials | Pasted in | Tidied | ||
| 2 | Grace | Khan | gRACE khan | |||||
| 3 | Tom | Clarke | TOM clarke | |||||
| 4 | Priya | Ali | priya ALI | |||||
| 5 | Marek | Smith | marek SMITH | |||||
| 6 | Nia | Patel | NIA patel | |||||
| 7 | Ollie | Nowak | ollie NOWAK | |||||
| 8 | Lucy | Brown | lucy brown | |||||
| 9 | Hamza | Johnson | HAMZA johnson |
The lessons
Each lesson starts with a short worked example, then exercises on real-looking data, marked the moment you press Check, with hints when you need them. It ends with a Check: new questions on fresh data, with no hints. Pass it and the lesson is marked Secure.
- Text functions Free
&, LEFT, LOWER, PROPER, TRIM · 6 exercises · a Check of 3 questions · guide: Combine first and last names in Excel - Cleaning text Pro
TRIM, UPPER, SUBSTITUTE, LEN · 4 exercises · a Check of 3 questions · guide: Change case in Excel - Splitting and joining Pro
LEFT, MID, FIND, TEXTAFTER, TEXTJOIN · 4 exercises · a Check of 3 questions · guide: Split first and last names in Excel - Numbers and dates stored as text Pro
VALUE, DATEVALUE, DATE with LEFT, MID, RIGHT · 4 exercises · a Check of 3 questions · guide: Excel formula not calculating - Duplicates Pro
COUNTIF to spot repeats, first copies, UNIQUE, COUNTIFS · 4 exercises · a Check of 3 questions · guide: Finding and removing duplicates in Excel
Extra practice
Useful, but not needed for the project.
- Text: CONCAT, TEXTJOIN, TEXTBEFORE, TEXTAFTER Pro
CONCAT, TEXTJOIN, TEXTBEFORE, TEXTAFTER · 6 exercises · a Check of 3 questions - Searching text and wildcards Pro
SEARCH, FIND, ISNUMBER(SEARCH()), ?, * in lookups · 5 exercises · a Check of 3 questions · guide: If a cell contains text in Excel - TEXTSPLIT and LET Pro
TEXTSPLIT across and down, two separators, LET · 5 exercises · a Check of 3 questions · guide: TEXTSPLIT
The project in Excel: Event booking export
A messy download of bookings for a conference. Tidy it before the name badges are printed.
What you'll build:
- Names trimmed and in proper case
- Full names split, emails tidied
- Text dates turned into real dates
- Duplicates flagged, and a label for each badge
Download the workbook and do the job in Excel. A Check sheet in the workbook ticks off each task as you get it right, and the model answers are there to compare with when you've finished. You'll need Excel 2019 or later, or Excel for the web, which is free with a Microsoft account.
Counts towards a certificate
Unit 7 is part of the Excel Advanced certificate of achievement (Units 7 to 9, 10 hours of suggested CPD). To earn it, pass the Check in every lesson of those units while signed in (reviews and extra practice aren't needed), and finish each unit's project in Excel. Our server checks the work itself. Certificates come with Pro: see how they work.
Online practice and assessment, completed without supervision. Confident Cells is independent and isn’t connected with Microsoft. This is not a formal qualification.
Guides for this topic
- Change case in Excel: UPPER, LOWER and PROPERExcel has no Change Case button. Use UPPER for capitals, LOWER for lower case and PROPER for title case, build sentence case, then paste the values back. Mac too.
- Combine first and last names in Excel: &, CONCAT and TEXTJOINHow to combine first and last names in Excel with & or CONCAT, add the space, put the surname first, and join any text or a whole list with TEXTJOIN. With practice.
- Count unique values in ExcelHow to count the different values in a list in Excel with COUNTA and UNIQUE, the SUMPRODUCT way for older Excel, and how to leave out blanks. With practice.
- Excel formula not calculating: showing as text, or adding to 0Why Excel shows a formula instead of the answer, why SUM gives 0, and how to fix numbers stored as text and manual calculation, with a sheet to practise on.
- Finding and removing duplicates in ExcelFlag repeats with COUNTIF, keep the first copy, use Remove Duplicates without losing rows, and list each value once with UNIQUE. Try it in a free practice box.
- If a cell contains text in ExcelHow to check if a cell contains a word in Excel with IF, ISNUMBER and SEARCH, the COUNTIF wildcard way, and the mistakes to avoid, with a sheet to practise on.
- LEFT, MID and RIGHT: taking part of a code or a postcodeHow LEFT, MID and RIGHT take part of a product code or a UK postcode, how FIND and LEN help when parts change length, and the easier TEXTBEFORE and TEXTAFTER.
- LET: naming a step in a long formulaHow LET names part of an Excel formula so you work it out once and use it again, making long formulas shorter and easier to read. Worked examples and practice.
- Split first and last names in ExcelHow to split a full name into first name and surname in Excel with LEFT, FIND and MID, take the last word with TEXTAFTER, and handle middle names. With practice.
- TEXTSPLIT: splitting text into cells with a formulaSplit names, addresses or codes at a comma or space with TEXTSPLIT in Excel 365, across or down, or at two separators at once. Try it in a free practice box.
- The TEXT function: day names, leading zeros and £ in a sentenceHow the TEXT function shows the day of the week from a date, keeps leading zeros and puts £1,234.50 in a sentence, with the format codes and a practice sheet.
- TRIM: removing extra spaces and tidying textHow TRIM removes extra spaces from names and codes in Excel, how to fix capitals with PROPER, and what to do when TRIM doesn't work, with a sheet to practise on.
Questions
Why won't a lookup find a name that's clearly there?
Usually a space you can't see, such as "Priya Shah " with one on the end. =LEN(A2) gives it away: the count is one more than the letters you can see. Tidy the list with =TRIM(A2) in a new column, or look up TRIM(A2) instead. The TRIM guide shows both.
Should I fix the data by hand or with formulas?
With formulas, in a new column. The original stays as it was, and the same formulas tidy next month's download too. When it's right, you can paste the results back as values.