Identitying duplicates and Delete Lines

999HelpPlease

New Member
Joined
Jul 16, 2014
Messages
35
I have a very large document with duplicate information. I have a column of Invoice numbers with matches, a column of material numbers with matches, a column of dollar amounts with matches. The variable is that I have a column with Days On that has a variation in it. I need to match the first three and then for the last one I want to keep the highest number of Days On and delete all the other line it pertains to. My document is 10,000 lines so I don't want to do this manually. Is there a way to write this in VBA. I don't have anything started yet.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I would go down the PivotTable route - very easy to select the criteria you need and then if you are still dead set on VBA afterworks you can easily work with the pivottable in VBA.
 
Upvote 0
I was able to do what I needed by doing a pivot table and then running VBA after it that was pretty simplified. Thank you for your suggestion.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top