+ Reply to Thread
Results 1 to 8 of 8

Search range of text strings in array

  1. #1
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    UK
    MS-Off Ver
    365
    Posts
    693

    Search range of text strings in array

    Hi, pls see attached example.

    Column E contains a range of search criteria.
    For every instance where any of those strings is found in column B, the corresponding value in column F shall be output.

    The list in column E may get quite long, so I need a variable/spilling approach.

    Any help much appreciated.
    Attached Files Attached Files
    Last edited by RaulSerg; 02-25-2025 at 04:18 PM.

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

    Re: Search range of text strings in array

    I don't see how it can be done when 123aifm needs to return something different to other instances of aifm or AIFM. Please provide more detailed sample data and explain the logic of each result.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    UK
    MS-Off Ver
    365
    Posts
    693

    Re: Search range of text strings in array

    Apologies, I think I mixed up two output results.
    Please find revised attached.
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,387

    Re: Search range of text strings in array

    Try this SPILL formula:

    =BYROW(B2:B6,LAMBDA(r,XLOOKUP(1,--ISNUMBER(SEARCH(E2:E3,r)),F2:F3)))
    Attached Files Attached Files

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

    Re: Search range of text strings in array

    Seen, but no reply ...

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,387

    Re: Search range of text strings in array

    Could you please respond to the help you have received in this thread? Some acknowledgement of the assistance I have given you freely would be appreciated. Also, the thread will need marking as solved.

    Thank you.

  7. #7
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    UK
    MS-Off Ver
    365
    Posts
    693

    Re: Search range of text strings in array

    Yes, seen but had not yet had a chance to test a bit further and take a few mins to digest, so didn't respond yet.
    Only managed to go through now.

    Works for my purposes, thanks.
    Will mark solved.

    Only thing one/I need to keep in mind: if a source input for some reason happens to contain both search criteria, only/always the first search criterion gets matched, so the order can make a difference in some very rare cases.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,387

    Re: Search range of text strings in array

    Your sample data needs to be realistic. If it isn’t, you won’t get a solution that works exactly as you want. We use your sample data to test solutions.

+ 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. SUM an array that contains some text values and partial text strings
    By tv2account in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-04-2020, 09:15 AM
  2. Swap Specific Text Strings in a Range and Indicate new Strings Not already in Code.
    By liquidmettle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-17-2018, 01:31 PM
  3. [SOLVED] Search range for multiple strings
    By cboud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-10-2016, 04:24 PM
  4. Search range of strings with a range of keywords and highlight matches
    By efillner in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2013, 04:07 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. Help searching an array of text strings for common strings
    By ABComp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-23-2012, 11:19 PM
  7. search for a part of string within an array of strings from another array list
    By jdonohue in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2011, 01:32 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