Hi All,
I have a dataset (columns A:L) on worksheet called "Total". Column A contains the row number of each record, and is the only unique field. I have another dataset on a worksheet called "Payables" which is a subset of the "Total" dataset, (ie: ALL the data in "Payables" appears in "Total").
What I need to do is identify all the records which are not payable. (ie: They would appear in the "Total" data but not in the "Payables" data). So I have created a third worksheet called "Non-Payables" and I've written code that copies and pastes both datasets onto this worksheet, with the "Payables" set being directly below the "Total" set.
The last step should be simple. I now need code that will check column A of the "Non-payables worksheet" identifying duplicates and deleting BOTH the rows on which the duplicates appear, thereby leaving me with a dataset which is essentially "Total" minus "Payables"
I've found loads of sites with code that will remove the second occurrences of each duplicate, but not BOTH duplicates. Can anyone help?
At the moment, I'm achieving this by using a recorded macro that highlights duplicates in red, then filters by colour, deletes all the red rows and clears the filter. This works, but boy is it slow and clunky.
Many thanks.
Brendan
I have a dataset (columns A:L) on worksheet called "Total". Column A contains the row number of each record, and is the only unique field. I have another dataset on a worksheet called "Payables" which is a subset of the "Total" dataset, (ie: ALL the data in "Payables" appears in "Total").
What I need to do is identify all the records which are not payable. (ie: They would appear in the "Total" data but not in the "Payables" data). So I have created a third worksheet called "Non-Payables" and I've written code that copies and pastes both datasets onto this worksheet, with the "Payables" set being directly below the "Total" set.
The last step should be simple. I now need code that will check column A of the "Non-payables worksheet" identifying duplicates and deleting BOTH the rows on which the duplicates appear, thereby leaving me with a dataset which is essentially "Total" minus "Payables"
I've found loads of sites with code that will remove the second occurrences of each duplicate, but not BOTH duplicates. Can anyone help?
At the moment, I'm achieving this by using a recorded macro that highlights duplicates in red, then filters by colour, deletes all the red rows and clears the filter. This works, but boy is it slow and clunky.
Many thanks.
Brendan