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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
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,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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