View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Erica[_3_] Erica[_3_] is offline
external usenet poster
 
Posts: 1
Default Find duplicate, save in a list, delete duplicate using macro

Hello.
I need to find a duplicate from ID col and if found, it needs to look
at the data in the associated row to compare if it is truly a
duplicate. And if it is (same Product and Acct #), the true duplicate
will be the one with later date. Then the duplicate that has the later
date record will store this info in a separate worksheet or area and
then delete the dupicate from the orginal list. Can this be done by
using macro? Thank you for your help in advance.

For Example:
ID Date Product Acct #
1150 7/24/2009 102 53
888 12/30/2009 Gas 50
1150 11/4/2009 102 53
5524 3/27/2009 Truck 48
888 11/30/2009 Gas 31
5524 4/27/2009 Truck 90
5524 5/30/2009 Truck 90

Final outcome:
ID Date Product Acct #
1150 7/24/2009 102 53
888 12/30/2009 Gas 50
5524 3/27/2009 Truck 48
888 11/30/2009 Gas 31
5524 4/27/2009 Truck 90

Separate List:
ID Date Product Acct #
1150 11/4/2009 102 53
5524 5/30/2009 Truck 90