PDA

View Full Version : Filter out Rows with multiple duplications of data



Jenstockt
06-05-2013, 11:20 AM
I am working with Excel 2007

I have two worksheets with columns A-F. I want to delete all rows from worksheet 2 which contain duplicate data in columns A, B, C, D and E on worksheet 1. The criteria for deletion also includes all other 5 duplicate out of 6 columns e.i A, C,D,E and F or B,C,D,E and F etc.

For example:
Worksheet 1
A, B, C, D, E F
1 X train purple cat coat
6 G car yellow dog hat
12 M boat blue pony shoe
6 A car green bird sock


Worksheet 2
A B C D E F
12 M boat brown pony shoe
12 E boat blue pony shoe
12 M car purple cat coat
6 A car green dog hat

Once I run the code, the only rows to remain on Worksheet 2 should be:

A, B, C, D, E F

12 M car purple cat coat
6 A car green dog hat

Caveat: I also want to be able to toggle (via buttons) the number of multiple rows by which I am filtering out rows. For instance, had I the option of deleting rows that contained 2 duplicates, the results would have been quite different.
All rows on worksheet 2 should be filtered out
Basically, I want to delete duplicate records based on multiple columns whose limits are by choice.

Thanks!
~AJ