The Excel Trim function removes extra spaces (i.e. all spaces except for single spaces between words or characters) from a supplied text string.
The syntax of the function is:
where the text argument is the text string that you want to remove the extra spaces from.
The following spreadsheet shows the Trim function applied to four different text strings.
In all four of the above cases, the result is the string
- with no spaces at the start or end and just one space in the middle.
For further information and examples of the Excel Trim function, see the Microsoft Office website.