+ Reply to Thread
Results 1 to 6 of 6

How can I resolve this VLOOKUP #REF error?

  1. #1
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    81

    How can I resolve this VLOOKUP #REF error?

    Hello,

    I am trying to use a VLOOKUP formula, and I cannot understand why it is not working correctly. Here is the function, which is pretty simple:

    Please Login or Register  to view this content.
    Does this have something to do with the fact that I'm trying to use an e-mail address as the search key? I've tried removing hyperlinks and formatting the columns as text, but it doesn't seem to help.

    I have attached a sample workbook -- I appreciate any help anyone can offer!
    Attached Files Attached Files

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: How can I resolve this VLOOKUP #REF error?

    Hello this error occurs because of the wrong reference
    In the array you have K to L column but in column number you are having 3....i.e. you must have at least three column i.e. array must be at least from column K to M
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: How can I resolve this VLOOKUP #REF error?

    Also vllokup cant be used that way
    You can use a index match function like this
    B3 =INDEX(DATA!$A:$S,MATCH(PEOPLE!$A1,DATA!$K:$K,0),8)
    for extracting the last name

  4. #4
    Registered User
    Join Date
    09-30-2011
    Location
    Lithuania
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: How can I resolve this VLOOKUP #REF error?

    This solves my problem - thank you!

    Out of curiosity, lets say the key is in column K, and the data I want to return is in H. Is there a way to do that?

    In other words, is there some way to basically do something like this:

    =VLOOKUP(PEOPLE!A1, DATA!K1:L9999, -3, 0)

    ...trying to get a value that is three cells back from the key cell? Obviously this won't work, based on what you two have described I'm doing wrong, but is there some other way to do this with a VLOOKUP?

    Would I have to move the column over to the right of the key column?

    Thanks so much for your help folks!

  5. #5
    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: How can I resolve this VLOOKUP #REF error?

    [B]
    Out of curiosity, lets say the key is in column K, and the data I want to return is in H. Is there a way to do that?

    In other words, is there some way to basically do something like this:

    =VLOOKUP(PEOPLE!A1, DATA!K1:L9999, -3, 0)
    No, you cannot use negative values in vlookup, it cannot (generally) look "behind" itself, you would change to INDEXMATCH for this

    The sample provided in post #3...
    B3 =INDEX(DATA!$A:$S,MATCH(PEOPLE!$A1,DATA!$K:$K,0),8)

    Instead of 8 (bolded), you use anothetr match to find the column number
    B3 =INDEX(DATA!$A:$S,MATCH(PEOPLE!$A1,DATA!$K:$K,0),MATCH(REPORT!B$2,DATA!$A$1:$S$1,0)
    Assuming Data had headings in row 1
    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

  6. #6
    Registered User
    Join Date
    02-14-2015
    Location
    Sydney, Australia
    MS-Off Ver
    2010
    Posts
    6

    Re: How can I resolve this VLOOKUP #REF error?

    Hi,

    I had a look at the attached - you only have 2 columns in your "SearchTable" reference giving you a vlookup #Ref! Error. Check out the following article for possible reasons leading to this (for example, did you delete a column?)

    http://www.excelvlookuphelp.com/my-v...returning-ref/

+ 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] Help to resolve Run time Error 380
    By LenaK in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-30-2015, 11:55 AM
  2. [SOLVED] Can't resolve PivotTable Property error.
    By dwhite30518 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2014, 12:27 PM
  3. Unable to resolve Runtime error 91
    By jr2007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2013, 07:37 AM
  4. Add ISERROR to resolve DIV/0 error
    By mtntxn in forum Excel General
    Replies: 2
    Last Post: 09-28-2009, 04:58 AM
  5. [SOLVED] How do I resolve debug error macro Excel 2000? At least, any lead
    By Excel 2000 Macros debugger in forum Excel General
    Replies: 5
    Last Post: 10-25-2005, 04:05 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