The problem at this point is that both A4 and A6 exist in the sheet when you only want the clean text (in A6) to replace the messy text (in A4). Replacing the content from A6 to A4 is simple to accomplish: Now only the clean text, without spaces, exists on the sheet. The procedure for dealing with a column isn’t that different from dealing with one cell. In this example, the column with too many spaces starts with A2. Now you’ll have column A with the extra spaces, and column B with the same text cleaned up. Perform the same copy and paste (values only) procedure in the previous step, but copy and paste the entire columns rather than just individual cells. Finally, right click at the top of column B to highlight the entire column, and delete it, shifting all other cells on the spreadsheet to the left. The benefit of using this approach is that you don’t have to go through the entire copy-and-paste procedure that you need to with the TRIM function. The method you use to remove extra spaces in Excel depends on what your original data looks like, and where the spaces are. Either way, one of these two methods should work well to help you clean up that messy text in your spreadsheet. The Text, in this case, refers to the data with the extraneous spacing. This argument can be:
The actual text enclosed in quotation marks A cell reference to the location of the text data in the worksheet
Many people think that the TRIM function removes only the spaces at the beginning and the end of the text. In actuality, it gets rid of all extra spaces. For example, if the text in cell A1 is: The Excel function =TRIM(A1) will provide the following result: