Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 465
Default How to make a number have a certain number of characters.



Hi All

I have a small problem.

I column A I have a row of cells , some of which have numbers , some of
which are empty.

The numbers usually have 12 or 13 chars.

Some have fewer than 12 chars. I need to make these up to 12 chars by
placing zeros at the start of each.

Cells with numbers already at 12 or 13 chars , or which are blank should
remain unaltered.


Can someone help with a formula to achieve this?

Thanks. Grateful for any advice.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,045
Default How to make a number have a certain number of characters.

On Thu, 15 Sep 2011 00:45:51 +0100, Colin Hayes wrote:



Hi All

I have a small problem.

I column A I have a row of cells , some of which have numbers , some of
which are empty.

The numbers usually have 12 or 13 chars.

Some have fewer than 12 chars. I need to make these up to 12 chars by
placing zeros at the start of each.

Cells with numbers already at 12 or 13 chars , or which are blank should
remain unaltered.


Can someone help with a formula to achieve this?

Thanks. Grateful for any advice.


You can custom format the cells: Type: 000000000000 (That's 12 0's)

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 157
Default How to make a number have a certain number of characters.

Hi Colin
Select your cells, right click, format cell and select Custom the type 12
"0"zeros e.g. 000000000000
HTH
Cimjet
"Colin Hayes" wrote in message
...


Hi All

I have a small problem.

I column A I have a row of cells , some of which have numbers , some of which
are empty.

The numbers usually have 12 or 13 chars.

Some have fewer than 12 chars. I need to make these up to 12 chars by placing
zeros at the start of each.

Cells with numbers already at 12 or 13 chars , or which are blank should
remain unaltered.


Can someone help with a formula to achieve this?

Thanks. Grateful for any advice.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 465
Default How to make a number have a certain number of characters.

In article , Cimjet
writes
Hi Colin
Select your cells, right click, format cell and select Custom the type 12
"0"zeros e.g. 000000000000
HTH
Cimjet



Hi

OK Thanks.

I did try this , and it works fine on the screen.

I save it as tab delimited. When I re-open the file the zeros have all
disappeared again , and I'm back with my too-short numbers.

How can I make the zeros stick?


Thanks again.




"Colin Hayes" wrote in message
...


Hi All

I have a small problem.

I column A I have a row of cells , some of which have numbers , some of which
are empty.

The numbers usually have 12 or 13 chars.

Some have fewer than 12 chars. I need to make these up to 12 chars by placing
zeros at the start of each.

Cells with numbers already at 12 or 13 chars , or which are blank should
remain unaltered.


Can someone help with a formula to achieve this?

Thanks. Grateful for any advice.





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 157
Default How to make a number have a certain number of characters.

Hi again
Start your custom code with a apostrophe. e.g. '000000000000
Excel will not accept zeros at the start of a number, the Apostrophe turn it in
to text
HTH
Cimjet
"Colin Hayes" wrote in message
...
In article , Cimjet writes
Hi Colin
Select your cells, right click, format cell and select Custom the type 12
"0"zeros e.g. 000000000000
HTH
Cimjet



Hi

OK Thanks.

I did try this , and it works fine on the screen.

I save it as tab delimited. When I re-open the file the zeros have all
disappeared again , and I'm back with my too-short numbers.

How can I make the zeros stick?


Thanks again.




"Colin Hayes" wrote in message
...


Hi All

I have a small problem.

I column A I have a row of cells , some of which have numbers , some of
which
are empty.

The numbers usually have 12 or 13 chars.

Some have fewer than 12 chars. I need to make these up to 12 chars by
placing
zeros at the start of each.

Cells with numbers already at 12 or 13 chars , or which are blank should
remain unaltered.


Can someone help with a formula to achieve this?

Thanks. Grateful for any advice.








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 620
Default How to make a number have a certain number of characters.

On 15/09/2011 01:18, Colin Hayes wrote:
In article , Cimjet
writes
Hi Colin
Select your cells, right click, format cell and select Custom the type 12
"0"zeros e.g. 000000000000
HTH
Cimjet



Hi

OK Thanks.

I did try this , and it works fine on the screen.

I save it as tab delimited. When I re-open the file the zeros have all
disappeared again , and I'm back with my too-short numbers.

How can I make the zeros stick?


When you save as tab-delimited you are saving as a text file. That file
will include the leading zeroes. The problem arises if you use Excel to
open the text file using Excel's default options. If you want to import
the data from the text file, tell Excel at the import stage that the
relevant column is text, not General.

David Biddulph

"Colin Hayes" wrote in message
...


Hi All

I have a small problem.

I column A I have a row of cells , some of which have numbers , some
of which
are empty.

The numbers usually have 12 or 13 chars.

Some have fewer than 12 chars. I need to make these up to 12 chars by
placing
zeros at the start of each.

Cells with numbers already at 12 or 13 chars , or which are blank should
remain unaltered.


Can someone help with a formula to achieve this?

Thanks. Grateful for any advice.






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 79
Default How to make a number have a certain number of characters.

On 15 Set, 02:18, Colin Hayes wrote:
In article , Cimjet
writes

Hi Colin
Select your cells, right click, format cell and select Custom the type 12
"0"zeros e.g. 000000000000
HTH
Cimjet


Hi

OK Thanks.

I did try this , and it works fine on the screen.

I save it as tab delimited. When I re-open the file the zeros have all
disappeared again , and I'm back with my too-short numbers.

How can I make the zeros stick?

Thanks again.



"Colin Hayes" wrote in message
...


Hi All


I have a small problem.


I column A I have a row of cells , some of which have numbers , some of which
are empty.


The numbers usually have 12 or 13 chars.


Some have fewer than 12 chars. *I need to make these up to 12 chars by placing
zeros at the start of each.


Cells with numbers already at 12 or 13 chars , or which are blank should
remain unaltered.


Can someone help with a formula to achieve this?


Thanks. Grateful for any advice.- Nascondi testo citato


- Mostra testo citato -


Hi Colin.
Try: =TEXT(A1,"0000000000000")
Regards
Eliano
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
Formula help with having characters in the number Jeremy Excel Discussion (Misc queries) 3 September 3rd 09 10:37 PM
number of characters in each cell jaywizz Excel Discussion (Misc queries) 5 June 12th 08 11:37 AM
Number of Characters Murray Excel Discussion (Misc queries) 3 November 6th 06 11:50 PM
Sorting by Number of Characters cny2 Excel Discussion (Misc queries) 3 July 28th 05 04:40 PM
How to make a number round up/down to a set number David S Excel Worksheet Functions 1 April 7th 05 04:20 PM


All times are GMT +1. The time now is 12:07 PM.

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"