Search code examples
regexgoogle-sheetsgoogle-sheets-formulags-conditional-formattingtextjoin

Highlight duplicate including partial text matching in Google Sheets


I have two sheets on a Google Sheet workbook as shown in the image. I need to highlight values from Column A of Sheet 1 when there is a match in Column A of Sheet 2. I use the conditional format rule =countif(indirect("Sheet2!A1:A"),A1) and things work fine.

But my requirement is also to show partial match in Sheet 1, e.g. if Sheet 1 has another row with "bikram sahu", it also should be highlighted. I tried wildcard characters(*), but that does not seem to work. I appreciate if someone can guide me on this.

enter image description here


Solution

  • =REGEXMATCH(LOWER(A1), LOWER(TEXTJOIN("|", 1, INDIRECT("Sheet2!A1:A"))))
    

    0