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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting whitespace in Excel 97 Macro 1

Status
Not open for further replies.

modorney

Technical User
Sep 5, 2000
65
US
I need to delete whitespace in Excel 97
What I have is a bunch of cells with data like " ABC"
and I want to do a macro that will trim them to "ABC"
They all have the same number of spaces, so all I want to do is
go to each cell and enter ^t and have the macro remove a fixed number of
blank spaces.

TIA
mike [sig][/sig]
 
Might be easier to do a find/replace?

Just hit ctrl-h. In the find box, enter the number of spaces you're trying to remove (hit your space bar X number of times). In the replace with box, don't put anything! Hit replace all.

You can easily record that macro. [sig]<p> <br><a href=mailto:techsupportgirl@home.com>techsupportgirl@home.com</a><br><a href= </a><br> [/sig]
 
This worked great!
Thanks, Dreamboat!

-- mike [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top