+ Reply to Thread
Results 1 to 3 of 3

Vlookup and zip codes

  1. #1
    Registered User
    Join Date
    07-19-2011
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    20

    Vlookup and zip codes

    ok, another vlookup problem. Sheet 1 contains numerous zip codes. Sheet 2 contains unique zip codes and cities. I want to use vlookup to populate sheet 1 with cities from sheet 2 using the zip codes. The problem is that only zip codes with zeros in fron work, like 01801 (Woburn, MA). All other zip codes doe not work and return #N/A. I tried to make all the zip codes text, general, numeric, and zip code but it still does not work. How do I get this to work using vlookup? I also searched the internet for help and they suggested I used index/match. I h ave never used those functions before and tried to follow their examples but cannot get it to work. If vlookup works, how can I get it to work? If index/match is better, can someone explain to me how it works and give and example base on my sheet 1 and 2? Just when I thought I understand vlookup, index/match comes along and adds to my confusion.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Vlookup and zip codes

    The problem will be in the data, something isn't what it looks like.

    Attach your sample workbook so we can look for ourselves at your two sheets.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    07-29-2014
    Location
    Oz
    MS-Off Ver
    2010
    Posts
    142

    Re: Vlookup and zip codes

    Try:
    =INDEX(Sheet2_Table_zipcodes_&_cities_e.g._A1:B2000,MATCH(Sheet1_zipcode_to_lookup_e.g._A5,Sheet2_zipcodes_e.g._A1:A2000,0),2) -- the "2" assumes your cities are in the second column of the range "Sheet2_Table_zipcodes_&_cities_e.g._A1:B2000"

    You should make sure that the ranges all have the same number of rows.

    Hopefully this is clear for you.

    Dan
    Don't forget to ☆ me if I helped you!

+ 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. Vlookup and left() with project codes
    By NeoFlex in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-26-2012, 11:42 AM
  2. [SOLVED] Vlookup using letter and numeric codes
    By LW_Greeney in forum Excel General
    Replies: 2
    Last Post: 05-23-2006, 12:25 PM
  3. Vlookup w/multiple codes
    By Whnke in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-12-2006, 04:15 PM
  4. VLOOKUP for ZIP codes??
    By Dluxe in forum Excel General
    Replies: 6
    Last Post: 05-23-2005, 04:06 PM
  5. [SOLVED] Vlookup from First Three Characters of Codes
    By prkhan56 in forum Excel General
    Replies: 6
    Last Post: 03-25-2005, 12:06 AM

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