Consulting

Results 1 to 3 of 3

Thread: Remove Duplicate Data by Specify Columns and Their Date

  1. #1
    VBAX Mentor
    Joined
    Feb 2012
    Posts
    406
    Location

    Remove Duplicate Data by Specify Columns and Their Date

    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 .


    Sample.jpg

    Hope someone can help me

    Really appreciate for your effort and time .

    Regards.
    Attached Files Attached Files

  2. #2
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    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

  3. #3
    VBAX Mentor
    Joined
    Feb 2012
    Posts
    406
    Location
    Appreciate for your great work .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •