Using the TRIM function:
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:
|text||Required||The text from which you want spaces removed.|