TRIM Formula — Remove Extra Spaces in Excel & Sheets (Free Tool)
Removes all spaces from text except for single spaces between words.
Common Errors & Fixes
TRIM not removing all spaces
Causes:- Non-breaking spaces (CHAR(160)) are not removed by TRIM.
- Line breaks or tab characters between words.
Fixes:- Use SUBSTITUTE to replace CHAR(160) with space first, then TRIM.
- Use CLEAN before TRIM to remove line breaks.
Frequently Asked Questions
Does TRIM remove line breaks?
No, TRIM only removes extra spaces between words and leading/trailing spaces. Use CLEAN to remove non-printing characters and line breaks.
What is the difference between TRIM and CLEAN?
TRIM removes extra spaces. CLEAN removes non-printable characters (line breaks, tabs, etc.). Use both: =TRIM(CLEAN(A1)) for thorough cleaning.
Does TRIM work in Google Sheets?
Yes, TRIM works identically in Google Sheets with the same syntax.
Related Formulas
Explore related formula generators to solve similar problems
🛠️ Related Tools
Want to become an Excel Pro?
Stop searching for formulas. Master Excel in 30 days with this top-rated course.
Learn More