I have this code that I modified from another user on this forum and retrofitted for my need. However, although it works perfectly the first time, every time I re-run it it keeps deleting one additional row when it should not delete any as the first time it was run it removed all rows that matched my criteria.
Can someone help me tweak this code?
Can someone help me tweak this code?
VBA Code:
Sub DelAllButAlvaro()
For j = 1 To 1
With Sheets("Pipeline")
.AutoFilterMode = False
.Range("$a$11:$cq$500").AutoFilter Field:=2, Criteria1:="<>" & "Alvaro Molinares"
.Range("B11:B" & .Cells(Rows.Count, "B").End(xlUp).Row).EntireRow.Delete
End With
Next j
Call Show_Realdeals
End Sub