#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros warning always shows up, even if all macros removed Joe M Excel Discussion (Misc queries) 1 December 20th 07 04:45 AM
Macros? Boss Excel Discussion (Misc queries) 2 October 31st 07 06:51 PM
Macros - copying macros from one computer to another TT Excel Discussion (Misc queries) 18 December 14th 06 03:24 AM
"openinf file..."ENABLE MACROS...DISABLE MACROS" F. Lawrence Kulchar Excel Discussion (Misc queries) 3 September 12th 06 10:33 AM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM


All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"