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

Share on Facebook

Tweet about this on Twitter

Share on LinkedIn

Share on Google+

Related Posts

Evaluate Formulas Step By Step in Excel This is one of the coolest tricks I have seen in Excel, as there are countless times wherein I had a hard time understand formulas. Especially long and complex ones!Excel provides the way to evaluate your formula, and break it down step by step so that you can understand it! ...
Consolidate with 3D Formulas in Excel 3D Formulas or References in Excel are a great way to consolidate data from multiple sheets.3D Formulas reference several worksheets that have the same structure which allows you to consolidate by using the SUM function.Formula breakdown:SUM(Sheet1:Sheet4!A1)...
WEEKDAY function: Introduction The WEEKDAY function returns the day of the week corresponding to a date.  The day is given as an integer, ranging from 1 (Sunday) to 7 (Saturday).So if you want to find out on what day you were born, then the WEEKDAY function will remind you.DOWNLOAD WORKBOOKHelp...
Extracting Data with Excel’s RIGHT Formula What does it do?It returns the last character or characters in a text string, based on the number of characters you specify.Formula breakdown:=RIGHT(text, )What it means:=RIGHT(look in this cell, extract X characters)There are times when you will need ...