Case study: clean a contact export with Excel's tools
Clean up messy data9 minPremium
Builds on Remove duplicates and choose what counts as a copy, Split a column with Text to Columns, Tidy text with TRIM, CLEAN, UPPER and PROPER and Paste only what you need with Paste Special.
A sales operations analyst in Montreal gets 2,000 contacts from the CRM for a trade show mailing. The emails carry stray spaces and capitals, some contacts were exported twice, and the names come in one column, last name first.
How it works
Each tool in this course changes the data in place, so the order of the steps decides what survives. Three habits keep a cleanup safe.
- Work on a copy. Duplicate the sheet before the first change, so you can always compare with what the CRM sent.
- Tidy before you compare. Remove Duplicates counts every space, so an email with a space at the end doesn't match the same email without it. Clean the column in a helper first, then remove the duplicates by the clean column.
- Freeze before you delete. A helper column of formulas depends on the column it reads. Paste it as values before you delete or overwrite anything it uses.
Then check the result. Count the rows before and after, so you know how many went, and look at a few of the rows that changed. Give Text to Columns empty columns or a Destination of its own, since it writes over whatever sits to the right.
The customer export case study builds the same kind of cleanup from formulas alone. This one uses the tools, with one formula where a tool can't do the job.
Example
Four of the analyst's contacts, with the duplicates removed in two different orders:
Common mistakes
- Removing duplicates before the cleanup. The copies with stray spaces survive, and the mailing goes out twice to the same people.
- Deleting the original column while the helper still reads it. The helper's formulas turn into
#REF!. Paste the helper as values first. - Splitting the names into columns that hold data. Text to Columns writes over them, so set a Destination to empty columns.
- Skipping the count. Without the number of rows before and after, a step that deleted too much goes unnoticed.
In short
- Work on a copy, tidy before you compare, and paste as values before you delete.
- Remove the duplicates by the clean column.
- Count the rows before and after, and check a few by eye.
Practice
Premium4 exercises: 1 set of steps, 1 formula and 2 dialogs.
Practice is part of Premium
Every lesson is free to read, and you can practice the free lessons without an account. This lesson's exercises are part of Premium, which you add to a free account.
Have one? Sign in