R
ryguy7272
I am trying to loop through a data set (sorted by ColumnD, ColumnF, and
ColumnG), and trying to delete dupes in ColumnD, ColumnF, and ColumnG.
'Compare and delete if dupes
Dim rCell As Range
With ActiveSheet
For Each rCell In .Range("D1" & _
.Range("D" & .Rows.Count).End(xlUp).Row)
With rCell
If .Value = .Offset(0, 2).Value Then
If .Value = .Offset(0, 3).Value Then
rCell.EntireRow.Delete
Else
End If
End If
End With
Next rCell
End With
The dupes aren’t deleted and I know I have to delete from the bottom up…but
I don’t think my code is doing that now. How can I change this to work
correctly?
Thanks,
Ryan---
ColumnG), and trying to delete dupes in ColumnD, ColumnF, and ColumnG.
'Compare and delete if dupes
Dim rCell As Range
With ActiveSheet
For Each rCell In .Range("D1" & _
.Range("D" & .Rows.Count).End(xlUp).Row)
With rCell
If .Value = .Offset(0, 2).Value Then
If .Value = .Offset(0, 3).Value Then
rCell.EntireRow.Delete
Else
End If
End If
End With
Next rCell
End With
The dupes aren’t deleted and I know I have to delete from the bottom up…but
I don’t think my code is doing that now. How can I change this to work
correctly?
Thanks,
Ryan---