Using Excel’s TRIM Formula To Clean Data


Using Excel’s TRIM Formula To Clean Data

Basic Functionality

The TRIM formula introduced by Microsoft Excel allows us to remove all the unwanted spaces that are present within a text, other than any singular spaces in between different words.

Breakdown of the formula:

In order to apply the formula, you need to enter the following command:

=TRIM(text)

You need to put in the text that you need all the extra spaces to be removed from.

While you are looking to achieve data in a cleaner form, a common scenario is the removal of all the extra spaces that are present within the textual data.

All the extra spaces present in between different words are pretty hard to spot, especially the ones that are present at the end. TRIM formula makes this very easy for you by allowing you to cleanse your data by making it free from any extra spaces regardless of the fact that they are present in the end, middle or the start of any textual data.

In other words, TRIM function makes sure to remove any unwanted spaces present within the textual data. It only tolerates the single spaces that are present in between the words.

In order to apply the TRIM function, you need to follow the steps that are described below:

Step 1:

In the first step, you have to enter the function by writing ‘=TRIM’.

Step 2:

In the second step, you need to take care of the trim argument by entering the textual data that you want any extra spaces to be removed from. You can enter the cell number that contains the data that needs to be fixed. For instance, you could write:

=TRIM(C9)

Step 3:

You can repeat the second step for all the cells that you want to remove the extra spaces from.