Google-sheets – Highlight data that match with data from other sheet

conditional formattingformulasgoogle sheetsregex

I have two tabs in a Spreadsheet. Both are having a list of data. I want to highlight cells in one tab that match with cells from another tab.

For example:

Tab 1

Column 1
ABC
XYZ
PQR
DEF

Tab 2

Column 1
DEF
PQR

Here, I want DEF and PQR to get highlighted in Tab 1 data.

How can I do this?

Best Answer

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

0