+ Reply to Thread
Results 1 to 4 of 4

Need function for finding and indicating repeats/duplicates

  1. #1
    Registered User
    Join Date
    01-20-2008
    Posts
    3

    Need function for finding and indicating repeats/duplicates

    I have a data of ten columns and 1000+ rows.
    Column A has the date and column D has the ID#.

    Need to find a way to do the following.

    If a ID# is repeated for a given date, then keep the first row
    with that ID# but delete the other
    rows that contain the same ID# in Column D or,
    if not delete then at least indicate those rows with some
    change in appearance (say, highlight them, or bold type)

    Thank You

  2. #2
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520
    One way, use an empty col to the right (eg col K) to flag the duplicate lines, then autofilter on col K for the dups and delete.

    Place in say, K2:
    =IF(COUNTA(A2,D2)<2,"",IF(SUMPRODUCT((A$2:A2=A2)*(D$2:D2=D2))>1,"dup",""))
    Copy K2 down to the last row of data. Apply autofilter on col K, filter out: dup. These are the duplicate lines you seek. Select all the filtered lines, right-click > Delete Row, then remove autofilter.
    Max
    Singapore

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    You may also want to have a look at
    http://www.cpearson.com/excel/topic.aspx

    In the D section there are several links for dealing with Duplicates
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Registered User
    Join Date
    01-20-2008
    Posts
    3
    Got it to work.

    THANK YOU VERY MUCH.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1