Excel: Trim Function – Getting rid of the extra spaces

Excel: Trim Function – Need to get rid of the extra spaces before or after the text in a cell? In another row or cell, type in the following code, replacing the cell A2 with the actual cell number that you need:


So this:          ”      This text has leading spaces.          ”

Becomes this:  “This text has leading spaces.”
(The quotes are just to show the spaces before and after the text)

Now you can copy the value of the new cell over the old value and there you have it!



Joe Austin

Joe Austin is the founder of Potentials Unleashed. He is currently an IT Professional Manager in the Financial Industry and has been using computers since 1978. While mostly self-taught, he is proficient in several computing areas, such as Programming , Web Development, most Microsoft Office programs, Internet Marketing, Spyware / Malware Removal and even 3D Animation & Modeling.

Click Here to Leave a Comment Below 0 comments
%d bloggers like this: