The function TRIM removes all spaces from a text string except for single spaces between words.

Syntax:

=Trim(text string)

Text String. Is the text or a reference to a cell from where the space need to be remove.