+ Reply to Thread
Results 1 to 11 of 11

Partial lookup from text string, return value from lookup list

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    Linthicum, MD
    MS-Off Ver
    Excel 2013
    Posts
    52

    Partial lookup from text string, return value from lookup list

    I will probably explain this incorrectly, but here goes.

    I'm looking for a "fuzzy Lookup" formula? that can look at a long string of text and pull out what matches from a list and return the value from the list. Is that possible?

    Example is attached.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Partial lookup from text string, return value from lookup list

    Try

    =INDEX($A$2:$A$50,MATCH(TRUE,ISNUMBER(SEARCH(G2,$A$2:$A$50)),0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Partial lookup from text string, return value from lookup list

    Hi,

    another way

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,179

    Re: Partial lookup from text string, return value from lookup list

    Try this in B2 ...

    =IFERROR(INDEX($A$2:$A$10,SMALL(IF(Before!$B$2:$D$10=$A2,ROW(Before!$B$2:$D$10)-1,""),COLUMNS($A$1:A$1))),"")

    Enter with Ctrl+Shift+Enter, copy across and down.

  5. #5
    Registered User
    Join Date
    02-29-2012
    Location
    Linthicum, MD
    MS-Off Ver
    Excel 2013
    Posts
    52

    Re: Partial lookup from text string, return value from lookup list

    I cannot get any of these to work.

    Just to recap, column A is my long string and I want to match the appropriate Team Name from Column G to Column A (put answer in column B).

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Partial lookup from text string, return value from lookup list

    Perhaps you'd better upload the workbook and manually add the results you expect into column B.

    I have interpreted your request as needing to take the names in column G and expand them to the longer string somewhere in column A that matches the partial strings in column G.

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Partial lookup from text string, return value from lookup list

    Try this in B2

    =IF(OR(ISNUMBER(SEARCH($G$2:$G$6,A2))),A2,"")

    Array confirmed with Shift Ctrl Enter.

    Does that do what you need? We would have a better idea what we were aiming for if you entered the expected results into your example.

  8. #8
    Registered User
    Join Date
    02-29-2012
    Location
    Linthicum, MD
    MS-Off Ver
    Excel 2013
    Posts
    52

    Re: Partial lookup from text string, return value from lookup list

    I have attached my original copy and added a column that says "expected answer". Please review the attachment to see if what I need is possible.

    Thank you so much.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Partial lookup from text string, return value from lookup list

    This will work for the first 3 team names, but not the last 2. Similarly, I think that any formula which will work with the last 2 will not work with the first 3.

    Using a short string as a partial match with longer strings is easy enough, but trying to match a partial string to a partial string is going to be error prone given that there are common words in the other team names.

    =IFERROR(INDEX($G$2:$G$6,MATCH(1E+100,SEARCH($G$2:$G$6,A2))),"")

    Array confirmed with Shift Ctrl Enter

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Partial lookup from text string, return value from lookup list

    Hi,

    I doubt there's going to be any easy way with standard Excel. In essence you're trying to extract a small subset of characters from a larger string. Excel finds it easier to find a small string of characters in a larger string.

    I think you're going to need a fuzzy lookup tool. Try this free Excel Fuzzy Lookup Add In from Microsoft

    I've used it on several occasions and it's pretty powerful.

  11. #11
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Partial lookup from text string, return value from lookup list

    You should replace 2 - Secen with Secen and Bill's Reserve with Reserve
    then enter formula in B2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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. Partial Text String Lookup from a List
    By lookingforhelp1 in forum Excel General
    Replies: 5
    Last Post: 01-14-2016, 09:15 AM
  2. Replies: 1
    Last Post: 10-17-2014, 09:13 AM
  3. Excel: Lookup text within string return Yes or No
    By TiggsTravis in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-17-2013, 12:17 PM
  4. Lookup partial value and return text I define
    By Venessa in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-11-2013, 11:21 AM
  5. Lookup text within string return category
    By potat5656 in forum Excel General
    Replies: 9
    Last Post: 02-02-2010, 05:46 AM
  6. Replies: 12
    Last Post: 10-01-2009, 01:05 PM

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