What does it do?

Removes unneeded spaces in your text, except single spaces in between words

Formula breakdown:

=TRIM(text)

What it means:

=TRIM(text that you want extra spaces to be removed)


In the quest for cleaner data, one of the common scenarios is removing extra spaces in our text.

Extra spaces are very difficult to spot, especially those at the end. The TRIM formula in Excel is one of the Data Cleansing functions and is great if you want to remove extra spaces from text whether it be from the start, middle or at the end of the text.

In a nutshell, the TRIM function in Excel removes unneeded spaces in your text, except single spaces between words.

This is how it is done below (go to the bottom of the page if you want to see the animated gif tutorial):

 

DOWNLOAD EXCEL WORKBOOK

 

STEP 1: We need to enter the Trim function

=TRIM

STEP 2: The Trim argument – Which text do we want to remove the extra spaces?

This is our data source:

Trim 01

Now place in the first cell as the argument for our Trim Formula.

=TRIM(C9)

 

Trim 02

STEP 3: Do the same for the rest of the cells by using the TRIM formula, notice all of the extra spaces have been removed:

Trim 03

Trim

If you like this Excel tip, please share itEmail this to someone

email

Pin on Pinterest

Pinterest

Share on Facebook

Facebook

Tweet about this on Twitter

Twitter

Share on LinkedIn

Linkedin

Share on Google+

Google+

Related Posts

SUMIFS Function: Introduction The SUMIFS function allows you to Sum multiple criteria. For example, you can select one Sales Rep from a list of Sales Reps and select one Region from a list of Regions and return the Sum of those arguments from a Sales list.  See how easy it is... DOWNLOAD WORKBOOK ...
Highlight All Excel Formula Cells Whenever you are auditing an Excel worksheet and need to know where all the formulas are located, a great way is to highlight the formula cells in a distinctive color.  This is how it is done: 1.Select all the cells in your Excel worksheet by clicking on the top left hand corn...
Sum a Range Using the INDEX Function You can sum a range of values within a table using the INDEX function in Excel.  This is valuable when you want to extract key metrics from a table and put them in an Excel Dashboard. To make this work you firstly need to start your Excel formula with the SUM function foll...
Vlookup in an Excel Table What does it do? Searches for a value in the first column of a table array and returns a value in the same row from another column (to the right) in the table array. Formula breakdown: =VLOOKUP(lookup_value, table_array, col_index_num, ) What it means: =VLOOKUP(thi...