SheetRocks
Documentation/Formulas/TRIM

TRIM

Removes all spaces from a text string except for single spaces between words.

Syntax

TRIM(string)

Arguments

Argument Description Required
string The text from which you want to remove spaces. Required

Examples

Remove leading and trailing spaces

=TRIM(" Hello World ")
Result ⇒ Hello World

Remove extra spaces between words

=TRIM("Hello World")
Result ⇒ Hello World

Clean up cell text

=TRIM(A1)
Result ⇒ Messy Text
A
1 Messy Text

Related Functions

Other Text functions:


← Back to Formula Reference