Search code examples
regexgoogle-sheetsgoogle-sheets-formulaarray-formulastextjoin

How to find which word contained within sentence


I have a list of suppliers in a column (column A) in Google Sheets, and I have transactions list from my bank. Each item description (column B) in bank transactions list is a mess of the supplier name and numbers. For each item description I want to find a matching supplier name from the suppliers list. How can I do this?


Solution

  • try:

    =ARRAYFORMULA(IFNA(REGEXEXTRACT(LOWER(B2:B), 
     LOWER(TEXTJOIN("|", 1, SORT(A2:A, 1, 1))))))
    

    y