+ Reply to Thread
Results 1 to 7 of 7

Vlook up and Zipcodes

Hybrid View

  1. #1
    Registered User
    Join Date
    03-09-2009
    Location
    Maryland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Exclamation Vlook up and Zipcodes

    Hello all,

    I'm creating a look up function for the staff where you enter in the zip code, and it returns a series of answers (the state the zip code is attached to, the shipping code to use for regular shipping, next day air, and IF it is available for that zip code, the codes to use for Saturday shipping).

    My problem is the fact that I'm looking up zipcodes. I have the cells, both the one where you enter in the zipcode to look up AND the entire column of the 29,000+ zipcodes formatted as "zipcode". However the cell where you enter in the zipcode.. it shows the "0" in the cell, but Excel thinks it's four numbers.. it's not recognizing the "0" in the function line. This means Vlookup is trying to find a 4 digit number, and not the 5 digit one I am asking it to, thus I get #N/A as a result for any zip code starting with "0". Every zipcode that starts with 1 or higher looks up just fine.

    I have it set as FALSE so it will return the #N/A when you enter in a nonshippable zipcode, or one that doesn't exist.

    If I change to TEXT, then it will not look up anything past "0" in the list, so all answers higher that 070xx (new jersey) come back as #N/A

    I'd really like to have just 1 look up, not two, one for Zipcodes starting in "0" and one for zipcodes starting with "1-9". Does anyone know what I can do here? I've tried combinations, but am I just missing something? I'd rather not go back and just drop the 0 in the lookup column of the zipcodes to make this work.. I spent hours reformatting this whole column to show right int he first place.


    Thanks for any help you can offer me.
    Last edited by ChefBacon; 03-09-2009 at 11:38 AM. Reason: fixed

  2. #2
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421

    Re: Vlook up and Zipcodes

    I am assuming you have a field that is the input for the lookup....format this field as a zipcode format as well...then have your vlookups based on that and all should be fine.

    UPDATE: I've added an example spreadsheet
    Attached Files Attached Files
    Last edited by GuruWannaB; 03-09-2009 at 11:09 AM. Reason: Uploaded sample spreadsheet

  3. #3
    Registered User
    Join Date
    03-09-2009
    Location
    Maryland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Vlook up and Zipcodes

    Yes the field for the lookup has been tested as both zipcode AND text. Zipcode will not look up any of the "0" zipcodes... Text will not lookup anything past the "0" zipcodes.

  4. #4
    Registered User
    Join Date
    03-09-2009
    Location
    Maryland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Vlook up and Zipcodes

    I see, your example is seeing the 0 zipcodes without the 0's in both the lookup and the input field. For some reason, mine isn't doing this.

  5. #5
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421

    Re: Vlook up and Zipcodes

    Are you able to post a file?
    I help because of the Pavlovian dog that resides in the inner me...so if you are happy with the results, please add to my reputation. It helps keep me motivated!



    Please mark your threads as Solved once it is solved. Check the FAQ's to see how.

  6. #6
    Registered User
    Join Date
    03-09-2009
    Location
    Maryland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Vlook up and Zipcodes

    Ah ha!

    I realized that in formatting the 29,000+ list, all of the 0 zip codes were formatted as text. I reformatted as number, then changed to zip code.. and now it works.

    Thanks for the help, your example actually helped me figure that one out. Now it works perfectly.

    Thanks again!

  7. #7
    Forum Contributor GuruWannaB's Avatar
    Join Date
    01-24-2008
    Location
    An hour due East of Cowtown Ohio
    MS-Off Ver
    2010
    Posts
    421

    Re: Vlook up and Zipcodes

    Glad to help

+ 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