TRIM Function. Remove unnecessary spaces between and before and after words, leaving one space between words.(Microsoft Excel)


Japanese version.

The TRIM function removes all unnecessary spaces in a sentence.
It is suitable for formatting data imported from other applications or manually inputted in large quantities.

How it works

textSpecify the target string.


This is an example of the result of executing the TRIM function.

The LEN function is used to display the number of characters, as it is difficult to discern visually.

All preceding and following spaces are deleted.
One space between words will be deleted.
TAB characters are not deleted, so use the CLEAN or SUBSTITUTE function.


If you specify the argument "text" the cell range, it will be Spil.



Microsoft Excel Functions Text