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 want to help you work in your business, so you can work on your business. I want to help you achieve your goals and help you have a successful small business journey. I understand that keeping up with the latest technology and cloud based computer trends can be difficult, when you’re running your day to day business. But, it is crucial that you keep up with the technology and best understand your options, in order to thrive in this new era of online business. I can help you discover the right software and tools for your business, train your team on how to use them, and mentor you to best serve and delight your customers. My certifications include: QuickBooks ProAdvisor, Microsoft Office Specialist Master, and OntraPort Certified Consultant. Please contact me on my new website 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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s