Sep 14 2007

Excel Trim Formula

How many times have you tried to import a file into Excel, only to have extra blanks all over the place in the document?  Well that’s where the Trim Formula can come into play.  The Trim formula is used to clean up and remove all the leading and trailing blanks as well as all but one blank in-between text that you may have in a list of cells.  So now instead of going into each cell one-by-one, there is one formula to do all the work for you.  Let’s take a look at the formula first (it’s a short one):


This formula is very easy to use but can make you job a whole lot easier. Let’s take a look at some of the examples now.


Example 1: =trim(”  Bird  “), will return “Bird”

Example 2: =trim(”  First       Second  Third     “), will return “First Second Third”

Trim Formula

Example 3: =trim(A2), will return “Mark Smith”

Example 4: =trim(A5), will return “Gene William Wilder”

Hopefully the few examples I listed above help you to understand how to use this formula and will save you some time the next time nothing seems to line up correctly.  If you have any other questions please leave a comment below or contact me using the contact form.

** Excel Hints provides Excel Tips and Excel Help for All Levels of Experience.

More Excel Tips

Did you find this post helpful? Try signing up for our free daily tips.

Enter your email address: 


Comments are closed.

Sign Up for Excel Hints

Free updates with Excel Hints, Tips & Tricks