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
"Brian" wrote in message
...
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.