+ Reply to Thread
Results 1 to 10 of 10

Search Text for text strings in a List

  1. #1
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    306

    Search Text for text strings in a List

    Hi

    I have a list of text strings I want to search for in a cell on each row. For each occurrence it find I want it to return description from the Library table.

    The matter is outlined in the attached file.

    Thank you

    Allister
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,786

    Re: Search Text for text strings in a List

    One way:

    =TEXTJOIN(",",1,FILTER(Library[Column1],(Library[Library]=Trans[@Ref1])+(Library[Library]=Trans[@Ref2])+(Library[Library]=Trans[@Ref3])))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,432

    Re: Search Text for text strings in a List

    Why do you expect Low, Low for the final row???


    =TEXTJOIN(", ",,IF(ISNUMBER(SEARCH(Library[Library],Trans[@[Ref1]:[Ref3]])),Library[Column1],""))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    306

    Re: Search Text for text strings in a List

    Yes you are right. The last row should read Low

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,786

    Re: Search Text for text strings in a List

    Glad to have helped.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  6. #6
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    306

    Re: Search Text for text strings in a List

    Hi Ali

    I noticed that when I tried the proposed solution it did not pick up the text "ump" in jump and Dump on the second row of text. Also the components in the Category Column are in the Order of Library[Column1} - they need to be in the order of columns Ref1 Ref2 Ref3 - is this possible?

    Thanks Ali

    Allister
    Last edited by AllisterB; 06-19-2022 at 08:24 PM.

  7. #7
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    306

    Re: Search Text for text strings in a List

    Hi Glenn

    Thanks for the solution.

    I did notice that the components in the Category Column are in the Order of Library[Coulmn1} - they to be in the order of columns Ref1 Ref2 Ref3 - is this possible?

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Search Text for text strings in a List

    Please try

    =TEXTJOIN(",",,TRANSPOSE(IF(ISNUMBER(SEARCH(Library[Library],C4:E4)),Library[Column1],"")))
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    306

    Re: Search Text for text strings in a List

    Hi

    Thank you for this nice solution. What would I change if I wanted cells that did not contain any of teh text strings in K Library to return a place Holder eg Low,,Medium

    Kind Regards

    Allister

  10. #10
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Search Text for text strings in a List

    Try

    =LET(m,MMULT(SEQUENCE(,ROWS(Library)),--(ISNUMBER(SEARCH(Library[Library],C4:E4)))),TEXTJOIN(",",0,IF(m,INDEX(Library[Column1],m),"")))
    Attached Files Attached Files

+ 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. [SOLVED] Loop with finding text strings in List1 and find in List2 text strings.
    By Grahamfeeley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2020, 11:43 AM
  2. Formula search for two text strings
    By jphilipson in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-26-2016, 02:50 PM
  3. Replies: 2
    Last Post: 05-21-2015, 03:09 AM
  4. Search For Multiple Text Strings
    By jham808 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-19-2015, 12:53 PM
  5. Truncate text strings using LEFT and FIND/SEARCH for multiple search terms
    By ngdoherty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-17-2013, 07:51 PM
  6. Search For Mutltiple Text Strings In Each Cell In A List
    By kevinwhite24 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-22-2013, 02:22 PM
  7. Keyword Search on Strings of Text
    By odie82 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-25-2007, 08:00 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