Search code examples
excelregexif-statementgoogle-sheetsgoogle-sheets-formula

Return yes if text contains any word from the list


I have a set of random texts (column A) and a list of course words (column B). The goal is to determine for each text from A, if it contains any of the course words from column B. Both texts and course words are in lower register.

Tried this formula, but it didn't work =count(SEARCH(D1:D7000,A$1:A$14))


Solution

  • use:

    =INDEX(IF(REGEXMATCH(""&LOWER(A2:A); TEXTJOIN("|"; 1; LOWER(B2:B))); "yes"; ))