Excel data cleaning
How to Find and Fix Typos in an Excel Column (Cities, Names, Categories)
List every distinct value in the column with its count (a pivot table does this in seconds). Real values appear many times; typos appear once or twice and look nearly identical to a common one. Fix them with a two-column replacement table and a lookup, or with Find and Replace. Never auto-correct values that are only similar: Milano and Milan, or Springfield in two states, are both real.
Free-typed columns such as city, country, job title or category drift over time: Boston, Bostn, boston, BOSTON, Boston MA. Filters and pivot tables then treat each spelling as a different thing. The fix has two parts, finding the variants and replacing them safely.
Step 1: see every distinct value with its count
Select your data and insert a PivotTable. Drag the column into Rows and again into Values (set to Count). Sort the counts from high to low. The popular spellings are at the top; the typos are the small counts that look almost like a big one further down. For a few hundred values, scan the list with the counts beside it.
Step 2: normalise case and spaces first
Half the variants are only capitalisation or stray spaces. Remove those before looking for real typos:
=PROPER(TRIM(A2))
PROPER capitalises the first letter of each word. It is fine for cities and names, but it will turn "USA" into "Usa" and "McDonald" into "Mcdonald", so check the result on abbreviations. See standardising names in Excel for the exceptions.
Step 3: build a replacement table
On a second sheet make two columns: Wrong and Right. Fill it from your pivot list:
| Wrong | Right |
|---|---|
| Bostn | Boston |
| Bosotn | Boston |
| NYC | New York |
| N.Y. | New York |
Then in a new column look each value up, keeping the original if there is no correction:
=IFERROR(VLOOKUP(A2,Fixes!$A$2:$B$100,2,FALSE),A2)
The original is kept whenever the value is not in your table, so nothing changes unless you decided it should. If the lookup misbehaves on values that look identical, see fixing VLOOKUP.
Step 4: let Excel suggest near-matches
On Windows, Microsoft's free Fuzzy Lookup add-in for Excel can match each value in one list to the closest value in another and shows a similarity score. Use it to compare your column against a clean reference list of cities or categories. Treat the score as a suggestion: review matches below roughly 0.9 yourself.
Warning: similar is not the same as wrong. Milano and Milan are both correct. Portland may be Oregon or Maine. Dover and Dover in different states are different places. A fix that is right 95% of the time still silently damages 1 row in 20, so only fix what you are sure about.
What is safe to fix automatically
- A keystroke slip where the value is one swap, drop or double letter away from one common spelling (Bostn, Bosotn) and nothing else is that close.
- Case and spacing differences.
- Your own known abbreviations, listed in the replacement table.
Anything that could be a different real value should be reviewed by a person, with the original kept.
A whole file at once
DecodingPro compares each value in a column with the spellings that column already uses. It corrects a keystroke typo only when one common spelling is the clear match, leaves look-alike real values untouched, flags the rest with the possible answers, and logs every change. In our internal benchmark about 90% of keystroke typos were corrected automatically, the rest flagged, and real look-alike values such as Milano next to Milan were left alone.
You start with 100 free credits. Every change is logged, and anything unclear is flagged, never guessed.
Fix a spreadsheetQuestions people ask
How do I find misspelled words in an Excel column?
Make a PivotTable of the column with a count, sort by count and look for small counts that resemble a big one. Spell-check (F7) finds dictionary errors but not misspelled names or places.
Does Excel have a fuzzy matching function?
Not as a built-in worksheet function. Microsoft offers a free Fuzzy Lookup add-in for Windows, and Power Query can match approximately when merging tables.
Is it safe to auto-correct similar values?
Only when one correct spelling is clearly closest and nothing else is just as close. Real values that merely look alike, such as Milano and Milan, must be left as they are.
Why did PROPER change my abbreviations?
PROPER capitalises only the first letter of each word, so USA becomes Usa. Fix those with a replacement table or exclude abbreviation columns.