Remove Spaces with the Trim Function in Excel

Extra spaces in Excel cause problems when analyzing the data. That is because in Excel typing a word and a space afterward is different from just typing the word. In the screen shot example below I have  listed “helmets” 4 times but in reality Excel would recognize it  3 times. That is because one instance (cell C10) has a space after helmets. You can’t see the space unless you double-click in the cell and put the cursor at the end.

Space after helmet

The Trim function is the solution to remove extra spaces. The Trim function only has one argument, the text or cell reference you want to remove spaces with. Use the Trim function on a new column and reference the current cell’s row. Then copy the formula down with the AutoFill handle. I like to double-click on what I call the hockey puck (AutoFill) and the formula will copy down. Just be careful to verify it copied down all the way as a blank row or cell can halt it. Well in all the versions except Excel 2013 the hockey puck (AutoFill handle) I’m referring to is black and now in Excel 2013 the Autofill handle is green. Oh well, I’m sure somewhere in the world they use green hockey pucks, right?


Trim function C3



Once you have the new calculated column ready, copy and paste values over top of the original list. The screen shot below has paste values from the paste special dialog box. In this example, I would click on cell C3 to paste values. Pasting values removes the formula reference.

copy and paste values
Practice yourself with my trim function.xlsx example.

About Steve Chase

I'm a proud husband and dad to 4 boys! Microsoft Certified Trainer and Boy Scout Leader are some of things I call myself. The Cincinnati Reds are my favorite team! When not outdoors, I enjoy working with documents in Microsoft Office, QuickBooks, Visio and Photoshop. My wife, Erin, shares her awesome recipes on her blog at
This entry was posted in Excel and tagged . Bookmark the permalink.

One Response to Remove Spaces with the Trim Function in Excel

  1. Pingback: Excel Roundup 20150209 « Contextures Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s