+ Reply to Thread
Results 1 to 9 of 9

VLOOKUP #N/A issue

Hybrid View

katiemay VLOOKUP #N/A issue 05-16-2016, 12:01 PM
TMS Re: VLOOKUP #N/A issue 05-16-2016, 12:39 PM
katiemay Re: VLOOKUP #N/A issue 05-16-2016, 12:53 PM
FDibbins Re: VLOOKUP #N/A issue 05-16-2016, 12:45 PM
Richard Buttrey Re: VLOOKUP #N/A issue 05-16-2016, 01:07 PM
katiemay Re: VLOOKUP #N/A issue 05-16-2016, 01:38 PM
FDibbins Re: VLOOKUP #N/A issue 05-16-2016, 01:00 PM
FDibbins Re: VLOOKUP #N/A issue 05-17-2016, 01:21 AM
katiemay Re: VLOOKUP #N/A issue 05-17-2016, 09:46 AM
  1. #1
    Registered User
    Join Date
    05-16-2016
    Location
    New Jersey
    MS-Off Ver
    2010
    Posts
    4

    VLOOKUP #N/A issue

    Hello and thank you in advance for any help. I'm new to the forum...

    I'm doing a vlookup between two files and it worked perfectly for the first 2,630 entries, but after that, it will show only #N/A for the results.

    Here is the first few lines of the file with the vlookup:

    State Zip Code Snow Fall Snow Depth Qualify Territory ID
    MA 01001 52.1 50.5 Yes 110105
    MA 01002 64.4 79.5 Yes 110105
    MA 01003 64.4 79.5 Yes 110105

    The Zip Code is the lookup value and the Territory ID is the result of the search from the other file. Here's the initial formula:
    =VLOOKUP(B2,'[ZIPTERR_2016-05-13 (2).xls]Sheet1'!$A$2:$B$41377,2,FALSE)

    I simply copied the formula into the entire Territory ID column and it worked fine - the B2 is replaced appropriately with each successive cell. It worked fine until I reached the zip codes that no longer begin with "0" -

    NY 12007 109.4 56.8 Yes #N/A
    thousands more like this all the way through...
    UT 84779 68.4 24.4 Yes #N/A

    The Zip Code column in this file and the source file are entered as "General." (I can't do them as numbers because it loses the actual zip codes starting with "0") The Territory ID in the source file is also entered as "General" and these apply to the full columns, so I don't know why the formula suddenly wouldn't work when it got to the zip codes starting with "1" instead of "0."

    Again, any help is greatly appreciated.

    Thanks,
    Kathy

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,163

    Re: VLOOKUP #N/A issue

    Be interesting to see the file, or a sample. A number in a cell formatted as General would still be treated as a number.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    05-16-2016
    Location
    New Jersey
    MS-Off Ver
    2010
    Posts
    4

    Re: VLOOKUP #N/A issue

    I shortened them both since the zip code one was too large...
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: VLOOKUP #N/A issue

    Also, would be interesting to see/know what the entry in row 2,630 is/looks like, and what the entry in 2,631 is/looks like?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VLOOKUP #N/A issue

    Hi,

    Presumably if the leading zero is showing the cell is Text, whereas the numbers are Numbers.
    Is the lookup table all text? Test the various cells with =ISTEXT(A1). In which case the result for numbers will be #N/A

    ..late edit. Just seen you've uploaded the file which I guess confirms the above.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  6. #6
    Registered User
    Join Date
    05-16-2016
    Location
    New Jersey
    MS-Off Ver
    2010
    Posts
    4

    Re: VLOOKUP #N/A issue

    I am eternally and immeasurably thankful that there are so many smart people in this world and that they're willing to take the time to help the Excel-challenged like myself.

    Thank you all so much. The &"" fixed the problem.

    sincerely - thank you!!!!!!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: VLOOKUP #N/A issue

    From row 2631 onwards, column B contains numbers, while the cells above contain text that looks like a number, so you would need to convert the number to text. Try this...
    =VLOOKUP(B2631&"",'[excel forum sample zip.xls]Sheet1'!$A$2:$B$4726,2,FALSE)

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: VLOOKUP #N/A issue

    Happy to help and thank you for the kind words

    (the & effectively converts a number to text)

  9. #9
    Registered User
    Join Date
    05-16-2016
    Location
    New Jersey
    MS-Off Ver
    2010
    Posts
    4

    Re: VLOOKUP #N/A issue

    I wrote it down on my "vlookup" notes so I won't have to search for this forum in the future (or bother you guys with it again!).

+ 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. [SOLVED] Vlookup Issue
    By theshaner in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-30-2015, 05:46 PM
  2. vlookup issue
    By bmcdougal in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-02-2015, 04:33 PM
  3. Another VLookup issue.
    By SamCrome in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-25-2012, 04:29 AM
  4. [SOLVED] Vlookup issue
    By justanot in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-18-2012, 12:09 PM
  5. [SOLVED] having a vlookup issue
    By komet12 in forum Excel General
    Replies: 3
    Last Post: 06-04-2012, 09:21 AM
  6. VLOOKUP Issue
    By NJT in forum Excel General
    Replies: 4
    Last Post: 03-07-2009, 06:47 AM
  7. Vlookup Issue (again)
    By melegaunt in forum Excel General
    Replies: 3
    Last Post: 01-24-2009, 08:46 PM

Tags for this Thread

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