Removing a keystroke

H

HeatherJ

Is there a way to remove all spaces within a column of cells? Extra spaces
are screwing up my subtotals. Thanks!
 
D

Dave Peterson

Select the column
Edit|replace
what: (space character)
with: (leave blank--not even a space character)
replace all

But....

Did you get this data from a web site?

If yes, then you could be seeing those non-breaking HTML spaces.

You can clean them up with formulas, but if you have to do it lots of times (or
with lots of data), you may want to use a macro.

David McRitchie has a macro that can help clean this:
http://www.mvps.org/dmcritchie/excel/join.htm#trimall
(look for "Sub Trimall()")

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)
 
D

David Biddulph

Select your column
Edit/ Replace:
Find what: [type a space]
Replace with: [leave empty]
Replace All
 
H

HeatherJ

wonderful! thanks so much for responding.
Heather

David Biddulph said:
Select your column
Edit/ Replace:
Find what: [type a space]
Replace with: [leave empty]
Replace All
--
David Biddulph

HeatherJ said:
Is there a way to remove all spaces within a column of cells? Extra
spaces
are screwing up my subtotals. Thanks!


.
 

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