Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble preserving number format 1

Status
Not open for further replies.

wilsonk

Programmer
Aug 9, 2001
7
US
I am trying to save an Excel document to type csv with the number format 00000 (zip code format). Some zip codes have zeroes left-padded (00501). When I open the csv document, however, the number has reverted back to 501.

I think I need to somehow convert the formatted 00501 to type text, but am unsure how.

All suggestions or alternatives are appreciated.

Ken
 
Have you tried saving them in zipcode format. If you type in CTRL-1, there is special ZIPCODE format, which should maintain the format.

 
When I:

Format the column as text, save as CSV, open in Word, leading zeroes appear.

Put an apostrophe in front of the zip, i.e., '08940, save as CSV, open in Word, leading zeroes appear.

Don't know if this helps. dreamboat@nni.com
Brainbench MVP for Microsoft Word
 
Thanks for the contributions. I understand what's happening now. When I save it in zip-code format, the 501 is saved as 00501. But when I re-open it in Excel, it displays as 501 still (which is where I was looking). Opening the file in Word shows the zeroes still pre-pended.

I'm a happy man. Thanks again!

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top