Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Specific format
Hi All,
Hope you can help me (think it's fairly easy). In column A there's list of numbers (9 characters long). One of our systems requires that the list of numbers (or per number) is preceded by 2 zero's, ie. 12345678 becomes 0012345678. I reckon a cut/copy and paste is a good option but (off course) I'm looking for a piece of programming that changes the numbers into the desired format. Thnx in advance Basta1980 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Specific format
Mike,
Right, good question. Did I forget to mention that our system doesn't work along with this solution. Thing is, in column A (or cel A1) for that matter you can see 00123456789 but it actually is just a change in format (as you suggested), i.e. in the function bar 123456789 is still displayed and this is copied (and therefore does not work in my case). Greetz Basta1980 "Mike H" wrote: Hi, Why not select these 9 digit numbers and apply a custom format of 00000000000 That's 11 zeroes. Mike "Basta1980" wrote: Hi All, Hope you can help me (think it's fairly easy). In column A there's list of numbers (9 characters long). One of our systems requires that the list of numbers (or per number) is preceded by 2 zero's, ie. 12345678 becomes 0012345678. I reckon a cut/copy and paste is a good option but (off course) I'm looking for a piece of programming that changes the numbers into the desired format. Thnx in advance Basta1980 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Specific format
Hi,
Then maybe a small macro Sub add_Lead_Zeroes() For Each c In Selection With c .NumberFormat = "@" .Value = "00" & c.Value End With Next End Sub Mike "Basta1980" wrote: Mike, Right, good question. Did I forget to mention that our system doesn't work along with this solution. Thing is, in column A (or cel A1) for that matter you can see 00123456789 but it actually is just a change in format (as you suggested), i.e. in the function bar 123456789 is still displayed and this is copied (and therefore does not work in my case). Greetz Basta1980 "Mike H" wrote: Hi, Why not select these 9 digit numbers and apply a custom format of 00000000000 That's 11 zeroes. Mike "Basta1980" wrote: Hi All, Hope you can help me (think it's fairly easy). In column A there's list of numbers (9 characters long). One of our systems requires that the list of numbers (or per number) is preceded by 2 zero's, ie. 12345678 becomes 0012345678. I reckon a cut/copy and paste is a good option but (off course) I'm looking for a piece of programming that changes the numbers into the desired format. Thnx in advance Basta1980 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Format date with specific regional format | Excel Worksheet Functions | |||
Specific format | Excel Programming | |||
Change Date Format to Specific Text Format When Copying | Excel Discussion (Misc queries) | |||
How to specific the cell format? | Excel Worksheet Functions | |||
Add cells with a specific format? | Excel Programming |