hi,
I'm trying to delete rows where the time in ColumnC is between 18:30 and 08:55, not sure whats wrong with my coding but when I run it it removes all data and only leaves the header?
![]()
Code: Dim idel As Long With Sheets("Sheet2") For idel = .Cells(Rows.Count, "C").End(xlUp).Row To 2 Step -1 If .Cells(idel, "C") > "18:30:00" Or .Cells(idel, "C") < "08:55:00" Then .Rows(idel).Delete End If Next idel End With
Bookmarks