VLOOK TABLE Index doesn't work
Results 1 to 4 of 4

Thread: VLOOK TABLE Index doesn't work
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Jul 2019
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default VLOOK TABLE Index doesn't work

    Iam trying to Vlook from one work book to another work. Cursor is locating correctly but not picking up the lookup value.


    Dim LValue as String

    lookFor = Internal_Sheet.range("A2").value
    Set IFRange = Snow_Sheet.Range("A1:I200")

    LValue = Application.worksheetfunctions.Vlookup(lookFor, IFRange, 2, False)

  2. #2
    Moderator mole999's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    9,819
    Post Thanks / Like
    Mentioned
    16 Post(s)
    Tagged
    2 Thread(s)

    Default Re: VLOOK TABLE Index doesn't work

    what would lookfor be in the cell, text or number or text number?
    • Yes I know there are better ways to do it. I just wish I knew them. - 97, 2003, 2007, 2010, 2013, 2016 & 2019
    • I wear my ignorance openly, excel is not my chosen career, its a means to an ends
    • Posting Guidelines Want to post well laid out questions and answers Translate Excel Versions
      Code:
      [CODE ]Put Your Code[/ CODE]
    • Settings > General Settings (on the left) scroll to the bottom, > Miscellaneous Options > Use ENHANCED
    • X-Posting Guidelines Rule 13 > CHART STUFF

  3. #3
    New Member
    Join Date
    Jul 2019
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VLOOK TABLE Index doesn't work

    Lookfor returns a string..

  4. #4
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    5,230
    Post Thanks / Like
    Mentioned
    49 Post(s)
    Tagged
    14 Thread(s)

    Default Re: VLOOK TABLE Index doesn't work

    Use Find Method.
    Try this:

    Code:
    Dim LValue as String, f as range
    
    lookFor = Internal_Sheet.range("A2").value
    Set IFRange = Snow_Sheet.Range("A:A")
    If isnumeric(lookfor) then lookfor = val(lookfor)
    Set f = IFRange.find(lookfor, lookin:=xlvalues, lookat:=xlwhole)
    If not f is nothing then
    Lvalue = f.offset(0,1)
    Else
    Msgbox "not exists"
    End if
    Regards Dante Amor

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •