+ Reply to Thread
Results 1 to 6 of 6

Trying to append a spreadsheet with a city name where I have the zip and state

  1. #1
    Registered User
    Join Date
    12-28-2012
    Location
    FL
    MS-Off Ver
    Excel 2007
    Posts
    4

    Trying to append a spreadsheet with a city name where I have the zip and state

    I am struggling with appending data to an existing database. I have a table with all of the zipcodes, City and State that needs to be referenced an then populated to the City collumn with the appropriate city name.

    I need a Vlookup that will pull the value from sheet 2 and populate the city column with the correct info
    Attached Files Attached Files
    Last edited by [email protected]; 12-28-2012 at 05:44 PM.

  2. #2
    Registered User
    Join Date
    11-15-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Trying to append a spreadsheet with a city name where I have the zip and state

    Does this need to be a formula?

    Here's a simple macro that looks up the city name based on the postal code:
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Trying to append a spreadsheet with a city name where I have the zip and state

    dcilley, welcome to the forum.

    Do you mean pull info per the attached?
    Attached Files Attached Files
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Trying to append a spreadsheet with a city name where I have the zip and state

    put this in Database!F2 and drag-fill down:

    Please Login or Register  to view this content.
    the ZIP column on Database tab is in number format, whereas on Zipcode Info tab it is in text format; hence the use of TEXT function - to convert number to text (will be useful in case of a zip-code like 01803 stored in number format, in which case the leading zero will be dropped by Excel).
    Last edited by icestationzbra; 12-28-2012 at 05:55 PM.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  5. #5
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Trying to append a spreadsheet with a city name where I have the zip and state

    @sullivan - nice work.

  6. #6
    Registered User
    Join Date
    12-28-2012
    Location
    FL
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Trying to append a spreadsheet with a city name where I have the zip and state

    Perfect, Thank you very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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