Search code examples
google-sheetscomparesubstringmatch

Google Sheets - Compare multiple words in cell with another cell & count number of matches


If cell A1 contains "Brother Sister Father Mother Grandson" and cell A2 contains "Mother Father", return 2 in cell A3.

How can I achieve this?


Solution

  • Try

    =SUMPRODUCT(TRANSPOSE(SPLIT(A1," "))=SPLIT(A2," "))