ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Leading digits (https://www.excelbanter.com/excel-discussion-misc-queries/24084-leading-digits.html)

Brent E

Leading digits
 
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.

Michael

Hi Brent
Put an apostrophe in front of the number, eg.

'00045879
this will enforce the zeros to be displayed


HTH
Michael
--
Michael Mitchelson


"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.


Bob Phillips

Custom form at of

000000

or however many

--

HTH

RP
(remove nothere from the email address if mailing direct)


"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.




Bob Phillips

Custom form at of

000000

or however many

--

HTH

RP
(remove nothere from the email address if mailing direct)


"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.




Brent E

Thanks guys, I'll try those ideas. I forgot about that apostope. cool. And
the customer sounds like a good way too, but I am curious, how do I do that
if the amount of leading 0s may be different for different numbers? Thanks
again guys.

"Michael" wrote:

Hi Brent
Put an apostrophe in front of the number, eg.

'00045879
this will enforce the zeros to be displayed


HTH
Michael
--
Michael Mitchelson


"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.


Kev Joy

You could put the following into a cell
'000

then add that to your licence number using &

i.e. =A15&B16

"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.



All times are GMT +1. The time now is 11:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com