Google-sheets – How to detect duplicates in two worksheets

conditional formattingfilterformulasgoogle sheets

I have 1 Google Sheet with 2 worksheets:

  • Worksheet "1" has 1 column A with 5 lines of data (AAA, AAB, AAC, AAD, AAE)
  • Worksheet "2" has 1 column A with 5 lines of data (AAA, BBB, CCC, DDD, EEE)

I would like to automatically detect that AAA is, in fact, a duplicate since it exists in both worksheets. I would like to detect this in worksheet "2".

I understand this should be done by using Conditional Formatting but I don't know how.

Best Answer

=FILTER(A2, COUNTIF(INDIRECT("sheet1!A2:A"), A2))

0