Highlighting duplicate data based on two conditions

11/18/19 Edited 12/09/19


I want to make a formula to highlight whenever to cells contain the same data on the same date. I'm working with a marketing calendar and want to find a way to highlight whenever two campaigns are planned to go out to the same country on the same date. So, if two (or more) cells contain the same date as well as the same country locales. 

The only formula I can find is to check if there are duplicates in ONE column, but I want to check all columns against each other. 

I have created a helper column in which to place the formula and thinking to make conditional formatting, once it's ready. The conditional formatting should apply if more than one row has identical data in cell 1 (date) and cell 2 (country).

Is this possible?



  • Paul NewcomePaul Newcome ✭✭✭✭✭

    Try something like this in a checkbox type column...


    =IF(COUNTIFS([Date Column]:[Date Column], [Date Column]@row, [Country Column]:[Country Column], [Country Column]@row) > 1, 1)


  • Hi Paul,

    Thanks so much for your suggestion. The formula works in the sense that it highlights if the data is identical. I need, however, the formula to highlight if there is duplicate data, meaning that if some data is the same. Example:



    The formula should work with the above data, because the number 1 is in both cells. Can you help with that?


  • Paul NewcomePaul Newcome ✭✭✭✭✭

    For this you would need to parse the data out so that each entry is in its own cell then do a comparison that way. How many entries could you possibly have in a single cell?


  • Paul NewcomePaul Newcome ✭✭✭✭✭

    @director62476 All you would need to do is add a flag or checkbox column. Then you can use a formula such as

    =IF(COUNTIFS([ID #]:[ID #], [ID #]@row) > 1, 1)

    This will count how many times the ID # on that particular row is found in the column. If it is found more than once, it will flag all rows that are duplicated.


  • Paul NewcomePaul Newcome ✭✭✭✭✭

    The semicolon vs comma is regional. If it is inputting the semicolon, then I assume that is what you need to use.

    The syntax is correct, and your column name matches. I don't see any extra spaces or parenthesis. The formula should be working.

    Let's work on some trouble shooting...

    Change the DupCheck column to a text/number type, and just enter


    What is the result?

    If it produces a number as opposed to an error, lets move on to

    =COUNTIFS([ID#]:[ID#], [ID#]@row)

    What is the result of that?


  • Paul NewcomePaul Newcome ✭✭✭✭✭

    That's odd. Try the IF statement again, but then try the same steps you just listed of leaving the cell, re-entering it, then tabbing out of it.

    At this point I would suggest reaching out to support, as that is definitely not supposed to act that way.


  • Paul NewcomePaul Newcome ✭✭✭✭✭

    The formula should have flagged both rows based on the logic. Do you have the formula in all rows?


  • Paul NewcomePaul Newcome ✭✭✭✭✭

    We would only have to expand on our COUNTIFS to include the additional range/criteria.

    =IF(COUNTIFS([ID #]:[ID #], [ID #]@row, CashBackSub:CashBackSub, [email protected]) > 1, 1)

    This will only flag rows where both the ID# AND the CashBackSub columns are duplicated within the same row.


Sign In or Register to comment.