The TRIM function removes all spaces from text except for single spaces between words. The use of TRIM is straightforward and is particularly useful when you paste or import data that has undesired spaces in it.

TRIM takes 1 required argument and no optional arguments:

Syntax: TRIM(text)

Using the TRIM function:
Be aware:
The text in the source cell (C4 in this example) is not altered itself and the formula cell (C8 in this example) contains only the result of a formula and not the text itself. To store the cleaned up text in cells, you can select and copy the cells that are using the TRIM function and then do a Paste Special to paste only the cleaned up text and into the destination cells.
The arguments for the TRIM function are:
Argument Required? Description
text Required The text from which you want spaces removed.


TRIM is a simple but useful function to clean up undesired spaces from text in any cell.
comments powered by Disqus