Excel: Here's a good one! Delete duplicates with macro keeping only the newest by date

I have a spreedsheet with 17,000 rows in it. In column D I have ID numbers and in column B I have the dates. There are multiple entries for each ID in column D which gives multiples dates each entry was given in column B. I need a VBA Macro that will identify duplicate entries in Column D and keep only the most recent entry by date in column B. Any help would be greatly appreciated. I'm banging my head on the desk to get this to work thanks!

This question generated 12 answers. To proceed to the answers, click here.

This thread is current as of February 14, 2011.

For more resources for Microsoft Excel