Format 000-00000-00000-000 and recognize leading zeros in Excel?

P

Peo Sjoblom

Excel has only 15 digits precision so you can't use that as a numericial
format

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey
 
J

Jackie Kohlman

I need to keep the leading zeros and the hyphens. Is there a way to do this?
 
D

Dave Peterson

preformat the cell as text and type all the 0's and hyphens

(or start your entry with an apostrophe:
'001-00234-00012-123
 
J

Jackie Kohlman

I am copying data from a SQL database into an excel ss. I must preformat the
cells of the ss that the data is being pasted to. This method still does not
keep the leading zeros. I am trying to eliminate the need to retype 4000+
numbers. Any suggestions?
 
D

Dave Peterson

Are you simply copying and pasting?

I've pasted into Notepad, saved that file, then used file|open to bring in that
data. I could specify text as the field type when I brought in that field.
 
S

Saruman

Go to Format, Cells, Custom

Type in the exact string you want with the zeros and the hyphens and click
ok

Any data entered will then be in that format

Saruman
 

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