Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
MVPitts
 
Posts: n/a
Default how to create leading zeros on variable length numbers

I have a column of variable length numbers/text (6-12 characters). I need to
place leading zeros in each of the cells to create a standard length of 15
characters. What's the easiest way to do this?
  #2   Report Post  
Gary''s Student
 
Posts: n/a
Default how to create leading zeros on variable length numbers

sleect cells or column then pull-down:

Format Cells... Number Custom and enter 000000000000000
in place of general
--
Gary's Student


"MVPitts" wrote:

I have a column of variable length numbers/text (6-12 characters). I need to
place leading zeros in each of the cells to create a standard length of 15
characters. What's the easiest way to do this?

  #3   Report Post  
FxM
 
Posts: n/a
Default how to create leading zeros on variable length numbers

MVPitts wrote:
I have a column of variable length numbers/text (6-12 characters). I need to
place leading zeros in each of the cells to create a standard length of 15
characters. What's the easiest way to do this?


Hi MVPitts,

Try :
=right(REPT("0",15) & "text" , 15)

@+
FxM
  #4   Report Post  
Niek Otten
 
Posts: n/a
Default how to create leading zeros on variable length numbers

=IF(ISTEXT(A1),REPT("0",15-LEN(A1))&A1,TEXT(A1,"000000000000000"))

--
Kind regards,

Niek Otten

"MVPitts" wrote in message
...
I have a column of variable length numbers/text (6-12 characters). I need
to
place leading zeros in each of the cells to create a standard length of 15
characters. What's the easiest way to do this?



  #5   Report Post  
Niek Otten
 
Posts: n/a
Default how to create leading zeros on variable length numbers

Which, indeed, can be simplified to

=REPT("0",15-LEN(A1))&A1

--
Kind regards,

Niek Otten

"Niek Otten" wrote in message
...
=IF(ISTEXT(A1),REPT("0",15-LEN(A1))&A1,TEXT(A1,"000000000000000"))

--
Kind regards,

Niek Otten

"MVPitts" wrote in message
...
I have a column of variable length numbers/text (6-12 characters). I need
to
place leading zeros in each of the cells to create a standard length of
15
characters. What's the easiest way to do this?





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
leading zeros are not showing in the formula bar but do show in ce Debbie Excel Discussion (Misc queries) 2 October 2nd 05 03:26 PM
Leading Zeros with a twist. Steve D Excel Discussion (Misc queries) 1 July 30th 05 01:28 AM
How do I eliminate leading zeros from downloaded data? Vanessa Excel Worksheet Functions 2 June 27th 05 05:11 PM
Graph with variable data length snoach Excel Discussion (Misc queries) 1 May 27th 05 10:15 AM
How do I display leading zeros so I can export a fixed in Excel? World Referee and accountant Excel Discussion (Misc queries) 2 January 3rd 05 04:18 PM


All times are GMT +1. The time now is 11:01 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"