Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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
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
Format date with specific regional format Fjord Excel Worksheet Functions 1 December 2nd 09 07:12 PM
Specific format Mike H Excel Programming 0 June 15th 09 12:42 PM
Change Date Format to Specific Text Format When Copying [email protected] Excel Discussion (Misc queries) 4 December 23rd 08 03:43 PM
How to specific the cell format? Eric Excel Worksheet Functions 6 January 19th 07 12:06 AM
Add cells with a specific format? qwery Excel Programming 2 November 11th 05 05:05 PM


All times are GMT +1. The time now is 05:22 AM.

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

About Us

"It's about Microsoft Excel"