Pinterest Pixel

Cleaning Data with Excel’s TRIM Formula

Bryan
What does it do?

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

Cleaning Data with Excel's TRIM Formula | MyExcelOnline
Download excel workbookTrim.xlsx

 

STEP 1: We need to enter the Trim function

Table of Contents

=TRIM

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

This is our data source:

Cleaning Data with Excel's TRIM Formula

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

=TRIM(C9)

 

Cleaning Data with Excel's TRIM Formula

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:

Cleaning Data with Excel's TRIM Formula

 

If you like this Excel tip, please share it



Cleaning Data with Excel's TRIM Formula | MyExcelOnline


Bryan

Bryan Hong is an IT Software Developer for more than 10 years and has the following certifications: Microsoft Certified Professional Developer (MCPD): Web Developer, Microsoft Certified Technology Specialist (MCTS): Windows Applications, Microsoft Certified Systems Engineer (MCSE) and Microsoft Certified Systems Administrator (MCSA).

He is also an Amazon #1 bestselling author of 4 Microsoft Excel books and a teacher of Microsoft Excel & Office at the MyExecelOnline Academy Online Course.

See also  SUMIF Function: Introduction

Steps To Follow

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...