ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   leading zero truncate - how to prevent ? (https://www.excelbanter.com/setting-up-configuration-excel/71454-leading-zero-truncate-how-prevent.html)

Gary N

leading zero truncate - how to prevent ?
 
When importing a .csv file where the data is encapulated (each item of data
is enclosed in double quotes) excel strips off the leading zeros.

Is there any way of preventing this from happening ?

The issue particularly nasty in that it removes preceeding zeros from a
zip-code, then the US postal service will not deliver.

Any ideas ?


David McRitchie

leading zero truncate - how to prevent ?
 
Hi Gary,
I would suggest fixing 5-digit zip codes with a macro, see
http://www.mvps.org/dmcritchie/excel/join.htm#fixUSzip5

You can try changing the .csv extension to .txt and then
during the Text Import Wizard indicate that the column is text.
It probably won't work though.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Gary N" <Gary wrote in message ...
When importing a .csv file where the data is encapulated (each item of data
is enclosed in double quotes) excel strips off the leading zeros.

Is there any way of preventing this from happening ?

The issue particularly nasty in that it removes preceeding zeros from a
zip-code, then the US postal service will not deliver.

Any ideas ?





All times are GMT +1. The time now is 07:07 AM.

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