Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXCEL: WHITE SPACE 1

Status
Not open for further replies.

susejdrol

Technical User
Apr 24, 2003
32
US
Team,

Is there any way to eliminate leading and trailing white space in all of the cells on a worksheet? Of course, I don't want to get rid of spaces that are insid the text, just the leading and trailing space that came over when I did some copying and pasting.

Thanks for any ideas you may have.

CP
 
That looks like it will work.

Thanks for the help

CP
 
Suse, nip over to Dave McRitchies site and grab a copy of his Trimall routine. Put it in your personal.xls and it will then always be available for use. I wouldn't be without this routine, as it has proved invaluable a number of times.

You simply select all your data and run the macro. It will then clear out any garbage in your data such as you have described. More too if you have other garbage such as non breaking spaces etc. A common occurrence when getting data from the web.

This saves having to use formulas and helper columns etc.


Regards
Ken.............
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top