Macroto delete extra space in a cell
On Wednesday, January 16, 2013 10:24:35 AM UTC-5, Metfan wrote:
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
--
Metfan
select on cell on the right of the first cell with data then type =A1*1 (assume A1 is the first cell with data) copy the formula to the reset of cells below.
|