• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need a macro to delete first duplicate row by comparing two column

Marison

New Member
Hi All,

please help me with a macro that will delete first duplicate row by comparing two column.

Kindly find the reference sheet attached.
 

Attachments

  • sample_file.xlsx
    8.2 KB · Views: 4
Hi !

At beginner level using Excel basics (formula, filter & copy)
just activating the Macro Recorder !

A demonstration according to your attachment :​
Code:
Sub Demo1()
     [F1].CurrentRegion.Clear
      Application.ScreenUpdating = False
With [A1].CurrentRegion.Resize(, 4).Columns
         .Item(4).Formula = "=A1&""¤""&B1<>A2&""¤""&B2"
         .Item(4).AutoFilter 1, True
         .Item("A:C").Copy [F1]
         .AutoFilter
         .Item(4).Clear
End With
      Application.ScreenUpdating = True
End Sub
If it's not what you expect so it may occur
with a poor attachment not reflecting real data …
 
Back
Top