Hi,
I have a data range in columns A:G. I want to remove data in each row in columns A:G based on duplicate values in column G.
The following code works well to remove duplicates in column G alone however I want to remove the data in all columns of the row with the duplicate value.
Any help appreciated.
Ryan
Dim a, e, x
For i = 1 To 5
Cells(1, i * 7).Select
With Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column))
a = .Value
.ClearContents
With CreateObject("Scripting.Dictionary")
For Each e In a
.Item(e) = Empty
Next
x = .keys
End With
.Resize(UBound(x) + 1).Value = Application.Transpose(x)
End With
I have a data range in columns A:G. I want to remove data in each row in columns A:G based on duplicate values in column G.
The following code works well to remove duplicates in column G alone however I want to remove the data in all columns of the row with the duplicate value.
Any help appreciated.
Ryan
Dim a, e, x
For i = 1 To 5
Cells(1, i * 7).Select
With Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column))
a = .Value
.ClearContents
With CreateObject("Scripting.Dictionary")
For Each e In a
.Item(e) = Empty
Next
x = .keys
End With
.Resize(UBound(x) + 1).Value = Application.Transpose(x)
End With