delete rows in excel by service date
Try this, it will allow you to select date range to delete.. (update
column # as appropriate -this assumes column 13)
Sub DeleteDatesRIM()
Dim StDate As Date, FinDate As Date, LastRow&, i&
StDate = InputBox("Dates to be Deleted- ENTER Start Date (DD/MM/
YYYY)")
FinDate = InputBox("Dates to be Deleted-ENTER End Date (DD/MM/
YYYY)")
LastRow = Cells(Rows.Count, 13).End(xlUp).Row
For i = LastRow To 2 Step -1
If Cells(i, 13).Value = StDate And _
Cells(i, 13).Value <= FinDate Then
Rows(i).Delete
End If
Next i
End Sub
|