# Help with Excel formatting of Zip Codes

**URL:** <https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156>\
**Category:** In My Humble Opinion\
**Created:** [August 5, 2022, 5:12pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156 "2022-08-05T17:12:13Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![Linda1219](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/linda1219/32/11672_2.png) [@Linda1219](https://boards.straightdope.com/u/Linda1219)\
**Post date:** [August 5, 2022, 6:57pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/21 "2022-08-05T18:57:51Z")

</div>

Thank you everyone I appreciate the help!! 😊

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [August 5, 2022, 7:03pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/22 "2022-08-05T19:03:09Z")

</div>

There are certainly workarounds possible. For example, if you do as @Dewey_Finn suggested,

> [@Dewey\_Finn](#):
>
> What happens if you put quotation marks around the Zip Codes before exporting to CSV?

that would probably work, in the sense of preserving the leading zeroes, but those quotation marks might still be part of the Excel file, which may or may not be acceptable if it has to be in a specific format.

---

<div class="post-metadata">

**Author:** ![TroutMan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/troutman/32/6721_2.png) [@TroutMan](https://boards.straightdope.com/u/TroutMan)\
**Post date:** [August 5, 2022, 7:03pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/23 "2022-08-05T19:03:14Z")

</div>

> [@Riemann](#):
>
> ETA: correction - it is stored in the CSV file as 00001, but when Excel retrieves it, it treats it as the number 1.

Right, the CSV has the correct data, but Excel messes it up when it opens it. This means that if the OP uses the CSV in the other customer software, it _might_ be OK (depending on what the other software does with it). But if you ever need to edit the file again, you’ll have to make the same changes all over again.

When I have a similar need, I maintain the file in .xlsx format so the formatting is correct, and then export to CSV each time I need to use it elsewhere.

---

<div class="post-metadata">

**Author:** ![Dewey\_Finn](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dewey_finn/32/4222_2.png) [@Dewey\_Finn](https://boards.straightdope.com/u/Dewey_Finn)\
**Post date:** [August 5, 2022, 7:05pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/24 "2022-08-05T19:05:09Z")

</div>

I just tried, and yes, the quotation marks are still present when I reloaded the document in Excel.

---

<div class="post-metadata">

**Author:** ![Riemann](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/riemann/32/3133_2.png) [@Riemann](https://boards.straightdope.com/u/Riemann)\
**Post date:** [August 5, 2022, 7:08pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/25 "2022-08-05T19:08:43Z")

</div>

Okay, there is a workaround, although it’s probably no easier than just reformatting each time you open the file.

Format the ZIP codes as text strings, then they are saved with the leading zeros in the CSV file. Instead of opening the CSV file in Excel, use File \ Import. On the third screen of the import wizard you can change the import format from “General” to “Text”.

---

<div class="post-metadata">

**Author:** ![Riemann](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/riemann/32/3133_2.png) [@Riemann](https://boards.straightdope.com/u/Riemann)\
**Post date:** [August 5, 2022, 7:16pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/26 "2022-08-05T19:16:53Z")

</div>

I also notice that if you have lost the leading zeroes and have the ZIP codes stored as numbers, using the special ZIP code format diplays the requisite leading zeroes automatically. If you must store only CSV files, the simplest thing is honestly just to leave everything as numbers, and re-format the column as ZIP codes each time you open the file in Excel.

---

<div class="post-metadata">

**Author:** ![Linda1219](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/linda1219/32/11672_2.png) [@Linda1219](https://boards.straightdope.com/u/Linda1219)\
**Post date:** [August 5, 2022, 7:19pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/27 "2022-08-05T19:19:59Z")

</div>

Wow that’s great! Thank you!!

---

<div class="post-metadata">

**Author:** ![Munch](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/munch/32/5281_2.png) [@Munch](https://boards.straightdope.com/u/Munch)\
**Post date:** [August 5, 2022, 7:51pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/28 "2022-08-05T19:51:01Z")

</div>

You could also create a new column next to the original one, and add the following formula (assuming zip code is ColA):

=TEXT(A2, “00000”)

---

<div class="post-metadata">

**Author:** ![Linda1219](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/linda1219/32/11672_2.png) [@Linda1219](https://boards.straightdope.com/u/Linda1219)\
**Post date:** [August 5, 2022, 8:03pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/29 "2022-08-05T20:03:50Z")

</div>

Oh awesome! I will try that. Thank you!! 😊

---

<div class="post-metadata">

**Author:** ![TroutMan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/troutman/32/6721_2.png) [@TroutMan](https://boards.straightdope.com/u/TroutMan)\
**Post date:** [August 5, 2022, 8:55pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/30 "2022-08-05T20:55:19Z")

</div>

An even easier approach - just stop doing business in New England.

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [August 5, 2022, 9:23pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/31 "2022-08-05T21:23:32Z")

</div>

Hah! 😄

Or, I suppose you could type in your zip codes using capital Os instead of zeroes.

---

<div class="post-metadata">

**Author:** ![penultima\_thule](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/penultima_thule/32/3833_2.png) [@penultima\_thule](https://boards.straightdope.com/u/penultima_thule)\
**Post date:** [August 6, 2022, 4:44am UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/32 "2022-08-06T04:44:07Z")

</div>

@Munch  
=TEXT(A2, “00000”)

+1

---

<div class="post-metadata">

**Author:** ![naita](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/naita/32/5862_2.png) [@naita](https://boards.straightdope.com/u/naita)\
**Post date:** [August 6, 2022, 8:11pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/33 "2022-08-06T20:11:42Z")

</div>

Who is the recipient of this file? You can specify the format of columns when opening/reading in a csv-file. And any program/person requiring a csv-file containing zip codes aught to be specifying it should be read in as text.

---

<div class="post-metadata">

**Author:** ![Linda1219](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/linda1219/32/11672_2.png) [@Linda1219](https://boards.straightdope.com/u/Linda1219)\
**Post date:** [August 8, 2022, 12:51pm UTC](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156/34 "2022-08-08T12:51:34Z")

</div>

Love it! 😁

[Previous page](https://boards.straightdope.com/t/help-with-excel-formatting-of-zip-codes/969156.md?page=1)
