TRIM
Remove leading and trailing ordinary spaces and collapse repeated spaces between words.
Syntax
=TRIM(text)Worked example
Remove padding and collapse repeated ordinary spaces.
=TRIM(" West Dock ")Result West Dock
Microsoft documentation
Check the arguments, supported editions and behavior of this function in Microsoft’s reference.
Microsoft referenceTRIM Function in Excel | TRIM & CLEAN to Remove Trailing & Leading Spaces From Right & Left of Text
Practice TRIM
Remove padding and collapse repeated ordinary spaces.
| A | B | |
|---|---|---|
| 1 | ||
| 2 |
Show example formula
=TRIM(B2) Lesson quiz
Answer three questions to see your level in this lesson.
