Zipcode to City, State Excel Spreadsheet


I just decided to do this. I’ve been meaning to learn more about the vlookup function in Excel. I figured this one would be a semi-useful template for you to use. This is best used on Excel 2010.

The way to use the sheet is just to copy and paste all of the zipcodes in the first column then the rest is magic.

Zip Codes to City State (xlsx) – Updated January 2019

Zip Codes to City State with Acceptable Cities (xlsx) – Updated January 2019


  1. Excellent work! Just was asked by my boss to list employees by state, and my list was all zip codes! Worked like a charm!

    Oh, zips which begin with zeros are not in the vlookup table, Connecticut, Massachusetts, Maine, New Hampshire, New Jersey, Rhode Island, and Vermont.


  2. Hi Edel,

    Question for you. Some zip codes have multiple (“acceptable cities”), but the vlookup stops at the first one. I love the granularity you offer, but it doesn’t pull those zip codes … often it’ll just pull the big city (i.e. Saint Louis). How can I modify it so that it pulls all “acceptable cities” for that zip code?

    Thanks for your awesome work.

  3. Is there some reason when I copy my list it returns #n/a error but if i then format cell and retype the zip code the vlookup works?

  4. The copy paste function returns #n/a error for me. If I copy format and then retype the zip code in the vlookup works. What causes this? Defeats the copy and past of my zip code list. Assume there is something silly going on with me.

  5. Was there a reply on that last comment? I am having the same issue. When I copy and past most say n/a. When I type the zip code in manually it works. Is there a fix to this?

  6. Hi Mark,
    Worked a while on John’s file. The problem we encountered is that the cells with the zipcodes have a hidden apostrophe. It looks like the apostrophes came in during an export from another system. What you might be able to do is to select the column, right click on the data and select Format Cells. Under the Number tab, make sure Number is selected. It might be text. Click OK and then try to copy/paste it again.

    Another option if you’re dealing with a big chunk of data is to try to remove the apostrophe by doing a text-to-column. This fastest solution I found so far: highlight the column, go to data, then text-to-columns, select delimited, then make one of the choices to be an apostrophe.

    Let me know if that works. I think there’s also an option to paste as value but we found that it still carried over the apostrophe. Keep us posted!

  7. Hi Edel,

    I’m running into the same issue as John did. However, even though ran text to columns to remove the apostrophes and formatted the column as numbers, I’m still getting N/A for about 2/3rds of the file. Do you know of any other causes of this issue?

  8. Interesting, if I paste zip codes that start with zero in the top part of the spreadsheet where you formatted with the formula it works. If I copy and paste the formula to extend I get N/As. Can you extend your formatting to include more rows?

  9. Hi Christian,
    So far, the only cause has been that some programs/databases export and hide that apostrophe. Have you tried cutting, then pasting into notepad, and then copying from notepad back into the excel sheet?

  10. Hi Kathryn,
    Thanks for using the spreadsheet. The first document goes all the way to 200 rows. The second almost reaches excel’s end. Are you working with more than 200 rows? Thanks.

  11. Hi Kathryn,
    Thank you so much for catching that. I updated the files. Please download and test them. Let me know if it works.

    For everyone,
    Dollar Signs ($) matter in the real world and programming world too.

  12. You LITERALLY saved me so much time. I had 4,933 zip codes that needed a city. I am ETERNALLY grateful.

  13. Great tool! I am trying to add by region also. There was a programmer from Walmart who shared a similar program but adding cities provides more accurate shopping data and the addition of regions makes it all powerful.

  14. HI Edel, is there a file for the reverse? That will take a full street address without a zip code and convert and add in a zip code?

  15. Hi Edel Alon,

    Thanks for responding.

    I am not pretty sure but I thinks it is city population, as I am searching on google manually like this “Cantonment FL population” I am trying to find any excel code to find the population of the city using the city or zipcode but I am not able to find any on google

  16. Hi Edel Alon,

    Thanks a lot! I am currently trying this one and so far it works the best. I really appreciate this.


  17. Do you have an international postal code template? i have zips from around the world and need their country’s name

  18. This is so great Edel!!! One tip for those that go to copy in their list of zip codes and it returns an N/A, make sure you convert your data to an actual number. My zips were in text form, so I had to convert them to general and then “poof”, like magic, Edel saved me so much time and work 🙂

    One request would be for you to add population data for those zips. Very daunting task, but would be very useful!

  19. Hello,

    This is EXACTLY what I need but I don’t know how to use it past the 5 rows already set up. Can you help?

    I would like to integrate it into an existing spreadsheet.


  20. Hi Jeff,
    I think I understand the situation. The best thing to do is copy the cells above and paste them below. Let me know if that doesn’t do the trick.


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.