This function allows remove all spaces from a text apart from single spaces between separate words.

 

Syntax

 

TRIM(Text)

  • Text (required) – This is the text you want to remove extra spaces from.

 

Example

 

In this example we use the function on the text “These     extra   spaces        are annoying!     ” to remove the excess spaces and result in the text “These extra spaces are annoying!”.

 

=TRIM(A2)

 

TRIM TRIM function