Text

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 reference

Search ExcelTutor