+ Reply to Thread
Results 1 to 4 of 4

vlookup reference

Hybrid View

  1. #1
    Registered User
    Join Date
    09-27-2007
    Posts
    4

    vlookup reference

    Can the Lookup_Value (in vlookup) be a reference to a cell that has a seperate function in it. If so how does the string need to be wordered.

    Example: =VLOOKUP(C6,K5:L200,2,FALSE)


    Where C6 is coded with this function: =LEFT(C15,4)


    Thanks,
    Justin

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    As long as the value returned from LEFT(C15,4) is in Col k then it will work

    e.g C15 = John Smith then if John is in the table it will work

    Does that answer your question

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    What do you have in C15?

    You might need to know that LEFT function always returns a text value, so if C15 contains a number, 123456 then LEFT(C15,4) returns a text string "1234" which VLOOKUP won't match with a number 1234.

    If that is the case and C15 is always numeric you might need to convert to a value by using

    =LEFT(C15,4)+0

  4. #4
    Registered User
    Join Date
    09-27-2007
    Posts
    4

    Amazing

    DaddyLongLegs, I am always amazed with you, you are an excel God!! That worked perfect. Thank you again for the time and help with my issue. I have been pondering it for days, I just couldn't figure out that +0, since it is a number.

    Thanks,
    Justin

+ 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