Spaces in cells

B

Brian

When I copy and paste information from a website to excel - the data that I
have copied from the website was center justified so spaces are copied. One
of the columns of data is currency so the $12.50 has three spaces before the
$. I cannot apply any formatting to the cells with the spaces in there.
When I delete the spaces everything is fine and my colums total correctly.
I want to remove all leading spaces form all cells in the worksheet.
 
B

Biff

See this:

http://www.mvps.org/dmcritchie/excel/join.htm#trimall

If you're copy/pasting from the web those spaces may not be standard char 32
spaces. They may be char 160 spaces.

The macro at the above link will take care of both. If you copy/paste alot
from the web this macro is a real time saver. I have it attached to a button
and is on one of my toolbars.

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top