Blake Ekelund
Excel
FP&A
Web Dev
Blog
Off the clock
Search
Ctrl K
Say hi
→
Loading...
TRIM – Excel Function | Blake Ekelund
Excel Library
›
TRIM
TRIM
Remove extra spaces from text, leaving only single spaces between words.
Beginner
— views
All
Syntax
Tutorial
Examples
Common Issues
Pro Tips
Related
Syntax
=TRIM(text)
Example Use Cases
Remove extra spaces
Normalize spacing from copy/pasted text
Common Issues
TRIM does not remove non-breaking spaces (char(160))
Users expect TRIM to remove all spaces, but it only collapses extra ones
TRIM cannot remove line breaks or tabs
Pro Tips
Use SUBSTITUTE(A1, CHAR(160), "") before TRIM to remove non-breaking spaces
Combine TRIM with CLEAN to remove hidden control characters
Use TRIM after text extraction to remove trailing spaces
Related Functions in TEXT & FORMATTING
Beginner Functions
Function
Use Case
Syntax
LEN
Count the number of characters in a text string.
=LEN(text)
CLEAN
Remove non-printable characters from imported or messy text.
=CLEAN(text)
Intermediate Functions
Function
Use Case
Syntax
TEXT
Format numbers, dates, or times as text using custom formatting.
=TEXT(value, format_text)
FIND
Locate the position of a character or substring in text.
=FIND(find_text, within_text, [start_num])