How to Remove Extra Spaces in Excel
Cells pick up stray spaces from data imports and from pasting in text that was typed or copied elsewhere: Word, a webpage, a CSV export. This guide covers Excel's own TRIM formula, the step that makes it stick, a blank-rows cleanup, and a way to check for spaces that don't show up visually.
The TRIM function
In an empty column next to your data, add a formula and fill it down:
TRIM removes spaces from the start and end of the cell and collapses any run of spaces between words down to one. It's a formula, though: the original cell is untouched until you copy the TRIM column, then Paste Special → Values back over the original column. Delete the helper column once the values have landed.
Skip the manual steps. Clean your text instantly, right here.
Clean it instantly with the free toolFind and Replace for double spaces
For a quicker fix without a helper column:
This only catches spaces between words. It won't touch spaces at the very start or end of a cell the way TRIM does, so it's a shortcut for the common case, not a full replacement for TRIM.
Removing blank rows
Select your data, then:
Go To Special selects blank cells only within whatever range you selected first. Deleting entire rows from that selection can remove rows that have data outside the selected column range, so select only the columns you mean to check before deleting.
Checking for spaces you can't see
Compare a cell's length before and after trimming:
If the two numbers differ, the cell has spaces TRIM would remove. TRIM alone leaves a non-breaking space (common in data pasted from a webpage) untouched, since it isn't a regular space. Clear those with:
For data you're about to paste into Excel anyway, running it through the free tool first often saves the formula-and-paste-as-values round trip entirely.