Hey there,
This code will delete duplicate rows (located at C3 and on) that match cell C2 but it also deletes all rows after the last duplicate that shouldn't be deleted....what is wrong with my code?
Dim i As Long, lastDataRow As Long
Dim wks As Worksheet
Dim BBB As Integer
Set wks = Sheets("NCR Data")
With wks
lastDataRow = Cells(Rows.Count, "C").End(xlUp).Row
BBB = .Cells(2, 3).Value
For i = 3 To lastDataRow
If BBB = .Cells(i, 3).Value Then Cells(i, 3).Select
ActiveCell.EntireRow.Delete
Next i
End With
thanks for any insight..i've tried playing around with it but no luck
Bookmarks