+ Reply to Thread
Results 1 to 6 of 6

VLOOKUP to return values based on partial text

  1. #1
    Registered User
    Join Date
    09-27-2010
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    VLOOKUP to return values based on partial text

    Hi,

    I am trying to get a vlookup to return values that contain SHERLOCK HOLMES. The table the vlookup looks at contains this:

    ADVENTURES OF SHERLOCK HOLMES, THE - UK VERSIONS (13 X 60)
    ADVENTURES OF SHERLOCK HOLMES, THE - UK VERSIONS (13 X 60)
    CASEBOOK OF SHERLOCK HOLMES, THE - UK VERSIONS
    MEMOIRS OF SHERLOCK HOLMES, THE - UK VERSIONS
    RETURN OF SHERLOCK HOLMES, THE - UK VERSIONS
    SHERLOCK HOLMES - THE ELIGIBLE BACHELOR - UK VERSION
    SHERLOCK HOLMES - THE HOUND OF BASKERVILLES - UK VERSIONS
    SHERLOCK HOLMES - THE MASTER BLACKMAILER - UK VERSION
    SHERLOCK HOLMES - THE SIGN OF FOUR

    The formula I am using is:

    =VLOOKUP("*"&$B$2&"*",$A$2:$A$10,1,FALSE)

    B2 = SHERLOCK HOLMES

    So far the formula works but only returns the top most value from the table. If the formula is copied down the top most value is just repeated.

    Anyone know how i can sort this so that it returns all of the individual values containing Sherlock Holmes and then display's N/A when no more are found?

    Just one point to mention, i am working in Excel 2003 here due to it being at work. See attached file.

    Help would be appreciated, thanks.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-26-2010
    Location
    A, A
    MS-Off Ver
    Excel 2003
    Posts
    86

    Re: VLOOKUP to return values based on partial text

    =INDEX($A$2:$A$22,D2,MATCH("*"&$B$2&"*",$A$2:$A$10,0)) where D2=1, D3=2, D4=3 and so on

  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: VLOOKUP to return values based on partial text

    In C2 with CTRL+SHIFT+ENTER rather than just ENTER

    =INDEX(A:A,SMALL(IF(ISNUMBER(SEARCH(B$2,A$2:A$10)),ROW(A$2:A$10)),ROWS(C$2:C2)))

    Then copy down...
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: VLOOKUP to return values based on partial text

    Hi

    C2=INDEX(A:A,SMALL(IF(ISNUMBER(SEARCH(B$2,A$2:A$10)),ROW(A$2:A$10)),ROWS(C$2:C2)))

    CSE (aRRAY FORMULA)

    hOPE TO HELPS YOU
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Registered User
    Join Date
    09-27-2010
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: VLOOKUP to return values based on partial text

    Thanks very much that worked awesome!

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: VLOOKUP to return values based on partial text

    You are welcome. Glad to helped you.

    So if you found your Solution, pls mark the Thread, as SOLVED.

+ 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