Hello,

I'm trying to write a macro to compare columns on the following data and delete rows with older dates. Here's the logic I am trying to convey based on following data:

Product A 15-Apr-06 14-Apr-07 Support A
Product A 14-Apr-08 13-Apr-09 Support A
Product A 14-Apr-09 13-Apr-10 Support A
Product A 14-Apr-10 13-Apr-11 Support A
Product A 15-Apr-07 13-Apr-08 Support A
Product B 15-Apr-06 14-Apr-07 Support A
Product B 15-Apr-06 14-Apr-07 Support B
Product B 15-Apr-06 14-Apr-07 Support C
Product B 15-Apr-06 14-Apr-07 Support D
Product B 14-Apr-08 13-Apr-09 Support A
Product B 14-Apr-08 13-Apr-09 Support B
Product B 14-Apr-08 13-Apr-09 Support C
Product B 14-Apr-08 13-Apr-09 Support D
Product B 14-Apr-09 13-Apr-10 Support A
Product B 14-Apr-09 13-Apr-10 Support D
Product B 14-Apr-10 13-Apr-11 Support A
Product B 14-Apr-10 13-Apr-11 Support D

Product B 15-Apr-07 13-Apr-08 Support A
Product B 15-Apr-07 13-Apr-08 Support B
Product B 15-Apr-07 13-Apr-08 Support C
Product B 15-Apr-07 13-Apr-08 Support D

I want to compare column A, then column D. If column D has same data, delete all rows but leave row with the latest date in column C. In this example, I've colored the rows I wanted to keep in red.

Please let me know if you would like further clarification and thanks in advance!