Thread
:
macros help...
View Single Post
#
5
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
macros help...
Can't you just apply a custom format of 00000
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"parnless" wrote in message
...
I have a vertical list of 4 digit numbers that I want to add a zero(0) to
the
beginning of the number. For example a number might be 3324 and I want to
add a 0 to the left of the 4 digits to end up looing like 03324. The
problem
is this: This vertical list of numbers is almost 1200 lines deep. Some
of
the numbers in this list are already 5 digits, whcih is what I want. I
need
every number on each line to be 5 digits long. I did create a macro to
add
the 0 to the 4 digit number, then drop down to the next line, but when I
run
the macro again for the next line, it changes the number on the next line
to
the same number on the line above. I want to be able to start in a cell,
hit
Ctrl G and have it add a 0 to the 4 digit number in that cell, then drop
down
a line and allow me to hit Ctrl G to do the same thing to the 4 digit
number
in that particular cell.
The left column in the spreadsheet looks like this:
2345
2365
2476
2490
And when I get through I want it to look like this:
02345
02365
02476
02490
What it is doing now is this:
02345
02345
02345
02345
It's changing each number in each row to look exactly like the number in
the
first row. I would appreciate any help anyone can offer. I used to use
Lotus 123 and did not have this kind of problems. Thanks in advance for
any
advise or solutions.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett