Excel Pragma

April 12, 2005

Duplicates in a Column - Conditional Formatting

Filed under: Data Analysis, General — Fadi @ 8:04 am

On the newsgroups, I saw a question about detecting duplicate entries in a column. Jan Karel suggested the pre-emptive approach with data validation which will not allow the user to enter a duplicate entry.

There are cases where duplicate entries have to be allowed but a visual indication indicates the duplicate values. Conditional Formatting comes in handy in those cases :

Suppose B1:B20 holds the data. the conditional formatting should be applied by selecting the range and applying the “Formula Is” is : =COUNTIF($B$2:$B$20,B2)>1.

CondFormatDuplicate

Duplicate data can still be entered but is automatically indicated :

CondFormatResult

1 Comment

  1. Hi,

    I like this version too in conditional formatting: =COUNTIF($B$2:B2,B2)>1
    This doesn’t color the first occurence :-)

    Zoltan,
    from Hungary

    Comment by ztill — July 7, 2006 @ 11:44 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress