#1   Report Post  
Posted to microsoft.public.excel.misc
vbastarter
 
Posts: n/a
Default padding ?

I have a columnn with id numbers
ex:
012
456788
78
.... etc
I would like the final Id to be 10 digits so i would like to pad 0's in the
front eg:
012 - has to become 0000000012
456788 - hast to become 0000456788

Is there a function in excel that can achieve this for teh entire column ?

Many Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default padding ?

You can change the number format to "0000000000" (without the quotes) and the
cells will display all those leasing 0's.

Select the column
format|cells|number tab
custom category
type in that long string of 0's
hit ok.

vbastarter wrote:

I have a columnn with id numbers
ex:
012
456788
78
... etc
I would like the final Id to be 10 digits so i would like to pad 0's in the
front eg:
012 - has to become 0000000012
456788 - hast to become 0000456788

Is there a function in excel that can achieve this for teh entire column ?

Many Thanks


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary Brown
 
Posts: n/a
Default padding ?


You have two options depending on what you are trying to achieve. If you
want the data to be held with the leading zeros then format the column
as text and put a data validation on the cells requesting a text length
of 10 characters.

If you are not bothered with what is actually in the cell, you just
want it to display with 10 numbers, then use a custom formt of
0000000000. This will then display the number 123 as 0000000123


--
Gary Brown
------------------------------------------------------------------------
Gary Brown's Profile: http://www.excelforum.com/member.php...o&userid=17084
View this thread: http://www.excelforum.com/showthread...hreadid=519664

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
How do I change the cell padding in excel? criticalpath Excel Discussion (Misc queries) 8 January 31st 06 11:20 AM
Change the cell padding? L_Coop Excel Worksheet Functions 1 December 14th 04 03:59 PM


All times are GMT +1. The time now is 03:12 AM.

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"