View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
isabelle isabelle is offline
external usenet poster
 
Posts: 587
Default Macroto delete extra space in a cell

hi Metfan,

copy a blank cell, select all the cells to change, then do a
PasteSpecial: xlAdd

isabelle


Le 2013-01-16 10:24, Metfan a écrit :
I download a file that contains 5,000 rows of data, each cell shows a
numeric value, however, you can not use a formula such as @sum to add
the data as each cell apparently contains an extra space after the last
digit in the cell. When I select a cell and press F2 I noticed the
cursor is 2 spaces behind the last digit, when I hit backspace and
deleted the extra space, the value then changed to a number which I can
use in a formula. I guess I need to write a macro to the following. Go
to each cell and edit and delete the extra space and then proceed to the
next cell and perform the same edit. This needs to be done for all
records. Any help on how to approach this macro would be helpful

Metfan