+ Reply to Thread
Results 1 to 5 of 5

#REF returned on Vlookup

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    #REF returned on Vlookup

    When I use

    =VLOOKUP(J2,Data!$C$2:$C$15000,2,0) when looking at email addresses ([email protected]) with a result being datetime- mm/dd/yyyy hh:mm:ss

    the return is #N/A when the cells do not match, abd I get #REF when they do match.

    What am I not seeing?
    Last edited by sinflspeed; 06-21-2013 at 02:37 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: #REF returned on Vlookup

    If you have 2 as the "Column index" then you need at least 2 columns in the range, you only have 1, hence #REF! try this version

    =VLOOKUP(J2,Data!$C$2:$D$15000,2,0)

    That looks up J2 in Data column C and returns the corresponding value from column D, is that what you need?
    Audere est facere

  3. #3
    Registered User
    Join Date
    04-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: #REF returned on Vlookup

    Excellent! Thank you!!!

  4. #4
    Registered User
    Join Date
    04-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: #REF returned on Vlookup

    What if I wanted to return a left six using that same formula?

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: #REF returned on Vlookup

    Quote Originally Posted by sinflspeed View Post
    What if I wanted to return a left six using that same formula?
    Sorry, I'm not exactly sure what you mean - do you mean you want to return a value from a column 6 columns to the left of the lookup range?

    If so VLOOKUP can't do that (it always "looks" to the right) - try using INDEX and MATCH, e.g. to match A1 with column G and return a value from column B

    =INDEX(B:B,MATCH(A1,G:G,0))

+ 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