Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Highlight row using conditional formatting if duplicate in two different columns of same row in Google Sheets

I apologize if this has been asked before, I tried searching but couldn’t find exactly what I’m looking for. I want to highlight rows in Google Sheets using conditional formatting if two different rows have duplicate data in column E, and they also have duplicate data in column F. I’m currently using =AND(countif($E:E,$E1)>1,countif($F:F,$F1)>1) which seems to work most of the time, especially if there are several rows that meet the criteria, but the problem is it is still highlighting a row if there is a duplicate anywhere in column E, and anywhere in column F, even if the duplicates are in different rows. Here is a link to a sample sheet where the problematic behavior is shown. In this example sheet, no row should be highlighting right now (if it is working the way I intend), since the duplicate data is not in the same row. If it is working the way I intend, it should never highlight only one row.

https://docs.google.com/spreadsheets/d/10LvijhfsvMKUDNwCQB9GsiEG-pjO87cqtpialoB4YNA/edit#gid=0

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

try:

=INDEX(COUNTIF($E:$E&$F:$F, $E1&$F1)>1)*($E1<>"")
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading