This article explains how to use Excel's TRIM function and the CTRL+H shortcut key to remove unnecessary spaces from your worksheet.
To remove extra spaces using the TRIM function, follow this procedure:
The problem is that there is both A4 and A6 text on the worksheet, while you only want to replace the messy text (in A4) with clean text (in A6).
It is easy to replace the contents from A6 to A4: