Excel Function: TRIM
The Excel function TRIM allows you to remove unnecessary spaces at the beginning and end of a string as well as excess spaces within the string.
Usage:
=TRIM(text)
Example of use
The goal here is to remove all unnecessary spaces from the data contained in column A.
To do this, enter into cell B2:
=TRIM(A2)
![excel function trim](https://www.excel-pratique.com/view/en/functions/img/trim/excel-function-trim.png)
Then drag down:
![excel function trim space](https://www.excel-pratique.com/view/en/functions/img/trim/excel-function-trim-space.png)