Beginner
Text
TRIM
Removes extra spaces from text, leaving only single spaces between words.
Compatibility: All Excel versions
Syntax
=TRIM(text)
Example
=TRIM(A1)
When to Use It
Use TRIM to clean up messy data pasted from another source that often has extra leading, trailing, or doubled-up spaces.