+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP partially working

  1. #1
    Registered User
    Join Date
    01-29-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    47

    VLOOKUP partially working

    I am using a vlookup function to find the high and low limits of a value given the selected "type" in a data validation drop down. The first column of the lookup table, and the data validation dropdown list both come from the same source range. This range is selected from another workbook.

    Basically the vlookup works on some of the drop down options but not all of them. When I use the evaluate formula tool to try and diagnose the problem it shows that the item from the drop down is not found in the first column of the table. I'm not sure how this is possible given they are both linked to the same range.

    The formula looks as follows:

    Please Login or Register  to view this content.
    Cell B23 is the data validation drop down cell, array A3:AC13 (on worksheet 'Gradation Limits') is the lookup array.

    I use the IF function to return #n/a if there is no limit given in the table. This allows me to graph the limits.

    I can't create an example that replicates my problem so I haven't attached anything. I'm just wondering if there is some problem I'm missing with because I pull the range data from another workbook.
    Last edited by ih8xc; 05-03-2011 at 08:06 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: VLOOKUP partially working

    Probably your VLOOKUPs are missing the 4th optional argument of FALSE to find exact matches:

    =IF(VLOOKUP($B$23,'Gradation Limits'!$A$3:$AC$13,2,FALSE)="",NA(),VLOOKUP($B$23,'Gradation Limits'!$A$3:$AC$13,2,FALSE))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

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

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: VLOOKUP partially working

    Try adding the 4th argument to the VLOOKUP()'s.

    =IF(VLOOKUP($B$23,'Gradation Limits'!$A$3:$AC$13,2,0)="",NA(),VLOOKUP($B$23,'Gradation Limits'!$A$3:$AC$13,2,0))

  4. #4
    Registered User
    Join Date
    01-29-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: VLOOKUP partially working

    Stellar! Glad it was something that simple.

    Thank you very much!

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: VLOOKUP partially working

    You're welcome. Thanks for the "scales tap".

+ 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