Formula to Remove Extra Spaces and Capitalize Names
Combine TRIM and PROPER to clean messy spacing and convert text into Title Case in one step:
=TRIM(PROPER(A2))
Worked Example: Cleaning Imported Names & Labels
| Cell A2 (Messy Input) | =TRIM(PROPER(A2)) Result |
Fix Applied |
|---|---|---|
" saurabh garg " |
Saurabh Garg | Removed outer & extra spaces, capitalized words |
"NORTH REGION " |
North Region | Normalized spacing and casing for clean grouping |
How to Apply Cleaned Values Permanently
- Paste as Values: After filling
=TRIM(PROPER(A2))down your column, copy the cleaned cells, select the target column, and paste Values Only so you can safely delete helper columns. - Prevent lookup & filter misses: Hidden spaces often cause XLOOKUP, VLOOKUP, SUMIFS, and COUNTIFS to miss matching entries.
Next Step: Also splitting combined text? See the TEXTSPLIT / SPLIT Guide or test cleanup formulas in the Formula Finder.