Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Leading 0s and Col Formatting

I've got an Excel workbook that contains many license numbers and I need to
format the column so that if a license number has several 0s in front, they
aren't automatically truncated by Excel. I tried general, number, and text
formats but they truncate leading 0s. Any ideas? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Leading 0s and Col Formatting

A couple of possible solutions... As a formula
=text(A1, "00000000")
which will convert the number to text and ensure that there are 8 digit
which would include leading zeros

Format Cell - Custom - 00000000

Which will change how the number is displayed. It is still stored as a
number without leading zeros, but it is displayed with the leading zeros.

HTH

"Brent E" wrote:

I've got an Excel workbook that contains many license numbers and I need to
format the column so that if a license number has several 0s in front, they
aren't automatically truncated by Excel. I tried general, number, and text
formats but they truncate leading 0s. Any ideas? Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Leading 0s and Col Formatting

Use a custom number format of 000000.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Brent E" wrote in message
...
I've got an Excel workbook that contains many license numbers
and I need to
format the column so that if a license number has several 0s in
front, they
aren't automatically truncated by Excel. I tried general,
number, and text
formats but they truncate leading 0s. Any ideas? Thanks.



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 Zero Rumy Excel Discussion (Misc queries) 11 December 7th 09 07:09 PM
keeping leading 0's when formatting cells James Excel Discussion (Misc queries) 3 July 1st 08 02:55 PM
Formatting numbers with leading and trailing zero's Victoria Excel Worksheet Functions 7 June 17th 08 06:14 PM
leading zero IRA Excel Discussion (Misc queries) 1 October 26th 05 06:47 PM
How do I retain leading zero zip code formatting when saving as a. RodFCIS Excel Discussion (Misc queries) 7 January 25th 05 07:29 PM


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