What does it do?

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

Formula breakdown:


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):




STEP 1: We need to enter the Trim function


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 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



How to Combine VLOOKUP and IFERROR to Replace the #N/A Error in Excel

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


Pin on Pinterest


Share on Facebook


Tweet about this on Twitter


Share on LinkedIn


Share on Google+


Related Posts

Cleaning Data with Excel’s REPLACE Formula What does it do? Replaces part of a text string, based on the number of characters you specify, with a different text string Formula breakdown: =REPLACE(old_text, start_num, num_chars, new_text) What it means: =REPLACE(this cell, starting from this number, all the ...
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: STEP 1: Select all the cells in your Excel worksheet by clicking on the to...
MATCH Function Intro   What does it do? It returns the position of an item in a range Formula breakdown: =MATCH(lookup_value, lookup_array, ) What it means: =MATCH(lookup this value, from this list or range of cells, return me the Exact Match) The MATCH function in Ex...
How to Convert Formulas to Values   Have you ever had a scenario where you write a formula and just want to show the value output only and get rid of the formula? Here is an example of a formula:   Well I do not need the formula, bit I do want the last names only....hard copied! Fortu...