For some reason, when I execute this query (to compare values in columns G and J), the loop will stop once it finds two matching values. This is driving me crazy! Any help or guidance would be greatly appreciated.
Sub FindDuplicates()
ActiveSheet.Cells.Select
Dim i As Long
For i = Selection.Rows.Count To 1 Step -1
If ActiveCell.Offset(0, 6).Value <> ActiveCell.Offset(0, 9).Value Then
ActiveCell.EntireRow.Delete
End If
Next i
End Sub
Sub FindDuplicates()
ActiveSheet.Cells.Select
Dim i As Long
For i = Selection.Rows.Count To 1 Step -1
If ActiveCell.Offset(0, 6).Value <> ActiveCell.Offset(0, 9).Value Then
ActiveCell.EntireRow.Delete
End If
Next i
End Sub