PDA

View Full Version : [SOLVED:] Remove Duplicate Data by Specify Columns and Their Date



parscon
12-28-2018, 07:26 AM
Hi , I have About 40000 Row that need to check their column A and K and if they are same delete all of the row except only one row with the newest date than others. (Keep latest date )
If you check the below image you will understand better .


23472

Hope someone can help me

Really appreciate for your effort and time .

Regards.

mana
12-28-2018, 07:59 AM
Sub test()
Dim r As Range

Set r = Cells(1).CurrentRegion

r.Sort Columns("j"), xlDescending
r.RemoveDuplicates 1
r.Sort Columns("a"), xlAscending

End Sub

parscon
12-28-2018, 08:10 AM
Appreciate for your great work .