Forum Discussion

Re: Macro needed - Delete duplicate rows in table when certain cells contain values

JoAvg 

You don't really need a macro for that. you can use Data > Remove Duplicates. If the duplicate rows with empty cells in columns I etc. are at the bottom, they will be removed.

As a macro:

Sub RemoveDups()
    Range("A1").CurrentRegion.Sort Key1:=Range("I1"), Header:=xlYes
    Range("A1").CurrentRegion.RemoveDuplicates Columns:=Array(2, 5), Header:=xlYes
End Sub
No RepliesBe the first to reply

Resources