• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Count if Formula to Not highlight first Duplicates

Hello!

I found a conditional formula (=(COUNTIF($A$2:$A2,A2)>1) to find duplicates and highlight everything except for the first occurrence. But the opposite is happening. Can someone please tell me what I am doing wrong? The file is attached.
Thank you!
 

Attachments

  • Book1.xlsx
    9.2 KB · Views: 8
Hello!

I found a conditional formula (=(COUNTIF($A$2:$A2,A2)>1) to find duplicates and highlight everything except for the first occurrence. But the opposite is happening. Can someone please tell me what I am doing wrong? The file is attached.
Thank you!
Hello
Sorry Couldn't see your file, However, the formula you've provided is designed to highlight everything except for the first occurrence of a duplicate in a column. If you want to reverse the condition to highlight only the first occurrence and not subsequent duplicates, you can adjust the formula. Here's the modified formula:

=COUNTIF($A$2:$A2, A2)=1

In this modified formula:
- `COUNTIF($A$2:$A2, A2)` counts the occurrences of the current value in cell A2 within the range from A2 to the current row.
- `=1` checks if the count is equal to 1, indicating that it's the first occurrence.

Apply this formula as a conditional formatting rule, and it should highlight only the first occurrence of each value in column A. If you want to highlight the entire row based on this condition, make sure to adjust the "Applies to" range in the conditional formatting rule accordingly.
 
Back
Top