Remove spaces in Excel with TRIM

When you import data, it is strongly recommended to use two following functions to "clean" the blank characters in your cells.

The TRIM function

This function is very useful for cleaning all the spaces before and after a string.

The function is very simply to use. There is only one argument, your text to clean.

=TRIM(your text)

Example when to use the TRIM function

In this example, we have sorted the  values of the column A in the column B.

But the sort doesn't respect the alphabetic order because the words DDDD and FFFF begin with a blank.

So we must clean strings with the TRIM function to remove the blank spaces.

To keep the result "clean", convert the formulas in value by making a paste special VALUE >like in this video.

 

Related posts


Permanent link to this article: https://www.excel-exercise.com/remove-spaces-in-excel-with-trim/


Leave a Reply

Your email address will not be published.