+ Reply to Thread
Results 1 to 8 of 8

Search a text for a array of values

  1. #1
    Registered User
    Join Date
    03-30-2023
    Location
    India
    MS-Off Ver
    365
    Posts
    18

    Search a text for a array of values

    Hello,

    I have a array of values, i need to search a text if any of the array of values exist in it.

    I used below, it works fine but if there is a text like "1. Ship(R45100A)" and both R45100 & R45100A exist in array, it shows result as R45100. but expectation is to get R45100A

    =INDEX(Objects!A:A,AGGREGATE(15,6,ROW(Objects!A$2:A$50)/(ISNUMBER(SEARCH(Objects!A$2:A$50,A2))),1))

    OR is there a way to get the count of values in array found in text?

    PFA data, please let me know if any thoughts

    Thanks
    Amith
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Search a text for a array of values

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-30-2023
    Location
    India
    MS-Off Ver
    365
    Posts
    18

    Re: Search a text for a array of values

    Quote Originally Posted by Fluff13 View Post
    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you for your response, it is working great. but we cannot relay on ")" as it may sometimes does not exist in text.
    any other option? OR is there a way to get count of values in array found in text?

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Search a text for a array of values

    In that case please upload a file with more realistic data.

  5. #5
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Search a text for a array of values

    B2

    =IFERROR(INDEX(Objects!A:A,MOD(AGGREGATE(14,6,(ROW(Objects!A$2:A$50)+LEN(Objects!A$2:A$50)*10^4)/((Objects!A$2:A$50<>"")*ISNUMBER(SEARCH(Objects!A$2:A$50,A2))),1),10^4)),"")

    copied down.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-30-2023
    Location
    India
    MS-Off Ver
    365
    Posts
    18

    Re: Search a text for a array of values

    Quote Originally Posted by windknife View Post
    B2

    =IFERROR(INDEX(Objects!A:A,MOD(AGGREGATE(14,6,(ROW(Objects!A$2:A$50)+LEN(Objects!A$2:A$50)*10^4)/((Objects!A$2:A$50<>"")*ISNUMBER(SEARCH(Objects!A$2:A$50,A2))),1),10^4)),"")

    copied down.
    Thank you so much, this is working fine

  7. #7
    Registered User
    Join Date
    03-30-2023
    Location
    India
    MS-Off Ver
    365
    Posts
    18

    Re: Search a text for a array of values

    Quote Originally Posted by Fluff13 View Post
    In that case please upload a file with more realistic data.
    Sorry for that, will keep this in mind for next time.

  8. #8
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Search a text for a array of values

    You are welcome.

+ 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. Replies: 6
    Last Post: 06-07-2022, 09:30 AM
  2. Conditional Formatting Text based on array values of adjacent array.
    By Quasar82 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-27-2017, 09:54 AM
  3. Search an array for text
    By bduncan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-16-2017, 03:28 PM
  4. Search for text within an Array
    By thearchitect85 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-06-2014, 11:41 AM
  5. Replies: 3
    Last Post: 01-09-2013, 07:55 PM
  6. Replies: 4
    Last Post: 01-02-2012, 12:58 AM
  7. Replies: 1
    Last Post: 01-01-2012, 02:54 PM

Tags for this Thread

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