leading zeros

D

Dave

Hi All,

I have an issue with formating cells. I have a permit number that has
leading zeros sometimes, so I must display them when entered. I have
tried 0?-??????? and 0#-####### but no luck. Heres is what my permit
number look
01-2345678 & 02-8765432.


thanks,

Dave
 
D

DB.

Dave said:
Hi All,

I have an issue with formatting cells. I have a permit number that has
leading zeros sometimes, so I must display them when entered. I have
tried 0?-??????? and 0#-####### but no luck. Here's is what my permit
number look
01-2345678 & 02-8765432.


thanks,

Dave


What is your column formatted as? I put your permit numbers in a
column formatted "General" - and they both came up OK..
I have Excel 2003 installed.
 
S

Shane Devenshire

Hi,

In all versions of Excel to enter 01-2345678 in a cell without loosing the
leading zeros, type 01-2345678

So, its not clear what your problem is because all you need to do is type
what you are showing and it goes in and displays as you want it.

Leading 0's are only a problem when you enter something as a number and when
you type 01-2345678 it is not a number, because of the -
 
R

RyanR

As has been pointed out, if you leave the dash (-) in, the cell will be
treated as text.

To force Excel to treat the cell as text, put an apostrophe at the start

e.g.
0123 will produce 123
'0123 will produce 0123

you can still treat the 0123 result as a number for the purpose of
arithmetic functions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top