Search code examples
google-sheetsgoogle-sheets-formula

How to find common words in two columns in Google Sheets


I am stuck with a task which am seeking help from you guys. the solution I want is to find common words in two columns. eg if a word comes common in two cells it must appear in another column. we don't need the words only in one column.

https://docs.google.com/spreadsheets/d/1u_AD1FAbq0ntushGSYZBsR59iPX1_p5ZSIq1mowQSQ4/edit#gid=0

pls take a look to the shared link.

A screenshot also is shown here:

enter image description here


Solution

  • In a array context,

    • MATCH Col1 against Col2 getting indexes of strings in Col1 that are present in Col2

    • FILTER Col1 against the resulting matched array

      =ARRAYFORMULA(FILTER(A2:A10,MATCH(A2:A10,B2:B10,0)))