+ Reply to Thread
Results 1 to 10 of 10

City & State from Zip Code

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    615

    City & State from Zip Code

    Though a number of queries out there, all I have noticed are those that ultimately refer to an internal database that would have to be created and maintained as a solution.

    I see that the USPS has a web based API set up and noted another called SmartyStreets (for some reason I associate them with the USPS), but the material goes right over my head.

    Does anyone know of any developed procedures that would allow Excel to send query and receive results from resources such as these?

    I recognize that I could easily have a huge disconnect here as though I know I can craft a call to the internet, I have no idea if I could receive a response somehow, but that's what makes this forum and you folks so great!

    Best Regards,
    B-

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: City & State from Zip Code

    Bruce,
    Here is a table that I have extracted from an Access DB that I use to extract City/County/Zip Codes. It is in Excel Format. I am guessing you could query this table with either VLookup or Index/Match. It is to large even when zipped to include here so I have placed it on the Box.net site. Here is the link where you can download it.

    https://app.box.com/s/vyrimdou6t6jlcpscahgnd1ajxbntagk
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,405

    Re: City & State from Zip Code

    .
    Here is one resource by searching : vba zip code search project

    http://www.excelhero.com/blog/2011/0...de-lookup.html

    There are probably more out there.


    You can use alansidman download or mine, then add a VLOOKUP or other search macro.

    https://www.amazon.com/clouddrive/sh...C1I1B0cCEduj53

  4. #4
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    615

    Re: City & State from Zip Code

    Many Thanks Gentlemen!

    When I think about it, I guess that the areas don't change too much (though they did do that once to me), so not having to force someone to be able to poll an online resource is probably a good thing, but as indicated, the file isn't exactly small! I still have to wonder how it might work to have the ability to run an online query and receive & place the results; if somehow those APIs could be worked. I just do not have the time to study that now nor the foreseeable future.

    Though normally my best work is done in the evening and nite, I am rather burnt out at the moment. Looking forward to working with the resources provided after tomorrow's doses of coffee.

    Once again, Thank-You, very much.
    Last edited by brucemc777; 08-23-2017 at 10:52 PM.

  5. #5
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    615

    Re: City & State from Zip Code

    I see I will have many hours studying Excel Hero in my future. I have used Evaluate ([]) very little, but it appears I will want to better understand its full scope due to the constant usage in the example; I think I now have a grasp on
    Please Login or Register  to view this content.
    and I never thought of using a statement such as
    Please Login or Register  to view this content.
    !

    If y'all are still out there and following, would you be so kind as to explain why in the following code they use "With Target.Parent.Hyperlinks"? Maybe I'm missing the boat, for I see nowhere that a hyperlink is used (stop laughing...)-
    Please Login or Register  to view this content.
    Much learning from the example going on, and I am sure there will be a lot going through the site's blog!...

    I know I am imposing on your time; if and when you can respond I appreciate it-

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,405

    Re: City & State from Zip Code

    .
    For an online search, the URL you posted in the original thread gives step by step instructions how and what to use to create a workbook with macros to perform that action (online query).

    I wouldn't be much assistance to you because I know nothing about it. There are others here on this FORUM and other forums who are proficient in the area. Hopefully someone can step forward and
    assist you.

  7. #7
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    615

    Re: City & State from Zip Code

    @Logit: Yes, but from the link you gave me, can you advise what the function is of that "With Target.Parent.Hyperlinks" statement? I see no hyperlinks to be used!

  8. #8
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,405

    Re: City & State from Zip Code

    .
    Not certain this is any clearer than mud (as indicated, I know nothing about web scraping):

    http://help.clickdimensions.com/faqs-1/

  9. #9
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    615

    Re: City & State from Zip Code

    TY!

    -Wouldn't be the first time I used code that made no sense to me

    -Edit: So far in my testing, eliminating that "With" statement makes no difference whatsoever...
    -Edit: Trying to get a good grasp of that "Select Case False" statement also, finding references on the internet and trying to understand when it is best to implement.
    Last edited by brucemc777; 08-24-2017 at 03:06 PM.

  10. #10
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,405

    Re: City & State from Zip Code

    .
    -Wouldn't be the first time I used code that made no sense to me
    I do that also ... but I cant advise someone else how to use confusing code ... it's too confusing.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Equation to Take a Zip code and Convert it to a City and State
    By jkfoxworth in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-08-2018, 03:25 PM
  2. autofill city and state when typing in zip code
    By shughes6288 in forum Excel General
    Replies: 7
    Last Post: 01-07-2016, 12:35 PM
  3. City, State, Zip, Area Code - with - Company Name match
    By gmjhunter in forum Excel General
    Replies: 1
    Last Post: 02-05-2015, 07:08 PM
  4. Parsing City State and Zip Code
    By sandy1977 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-27-2014, 11:58 AM
  5. zip code to city, state function
    By xip in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-07-2012, 10:12 PM
  6. Web lookup query (have: city & state | want: zip code)
    By avatarr in forum Excel General
    Replies: 0
    Last Post: 04-07-2010, 10:49 PM
  7. zip code to city, state function
    By xcelentform in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-18-2006, 07:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1