MisaNeco Works Blog

2026-10-19・Automation / Small business / Excel

Clean up a messy customer list in Excel or Google Sheets (5 formulas, 10 minutes)

Most small businesses have a customer list that grew by itself. Some names are in capitals, some are not. Emails have spaces at the end. The same customer appears three times. Mail merges break, and nobody trusts the numbers.

The good news: you can fix most of it in about ten minutes with tools you already have. Everything below works in both Excel and Google Sheets unless noted.

Before you start: make a copy of the file. Do the cleanup in new columns, check the result, and only then replace the old data.

1. Remove extra spaces: TRIM

Spaces at the start or end of a cell are invisible, but they make "Smith" and "Smith " look like two different people.

=TRIM(A2)

TRIM removes spaces at the start and end, and turns double spaces in the middle into single spaces.

Google Sheets also has a menu for this: Data > Data cleanup > Trim whitespace.

2. Fix capital letters: PROPER, LOWER, UPPER

=PROPER(TRIM(A2))   →  "jOHN smith "  becomes  "John Smith"
=LOWER(TRIM(B2))    →  for email addresses
=UPPER(TRIM(C2))    →  for postcodes, e.g. "sw1a 1aa" becomes "SW1A 1AA"

Check PROPER results by eye. It turns "McDonald" into "Mcdonald" and "O'NEIL" into "O'Neil", which may not be what the customer writes.

3. Remove hidden characters: CLEAN

Data copied from websites or other systems can carry line breaks and other invisible characters.

=CLEAN(TRIM(A2))

4. Make phone numbers consistent: SUBSTITUTE

If phone numbers are typed in different ways, strip the spaces, dashes, dots and brackets so they can be compared:

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(D2," ",""),"-",""),"(",""),")",""),".","")

"(555) 123-4567" and "555.123.4567" both become "5551234567". Now you can sort, compare and find duplicates.

5. Find duplicates before you delete them: COUNTIF

Do not delete duplicates blindly. First, mark them:

=COUNTIF($B$2:$B$1000, B2)

Put this next to the cleaned email column. Any number above 1 means that email appears more than once. Sort by that column and look at the duplicates together. Often one row has the newest phone number and another has the newest address, and you want to merge them by hand.

Two built-in tools

Put it together

A cleaned column for each field, side by side with the original:

Original Formula Result
jOHN smith =PROPER(TRIM(A2)) John Smith
John.Smith@Example.com =LOWER(TRIM(B2)) john.smith@example.com
(555) 123-4567 SUBSTITUTE chain 5551234567

When the new columns look right, copy them and use Paste special > Values only over the original data. Then delete the formula columns.

If you do this every month

If new messy lists keep arriving (from web forms, events or other systems), doing it by hand every time gets old. Two options:

To see which other admin jobs in your business are easy to automate, try our free Small Business Automation Check.

Free tools you can useSmall Business Automation Check
Related articlesBuild a weekly staff shift schedule in Google Sheets (hours per person, gaps highlighted)
Simple job costing in a spreadsheet - see if each job actually made money (Excel or Google Sheets)
How to raise your prices as a small service business - a simple calculation and a customer letter template