I have excel sheet which got 3500 lines of data. I want to delete rows which got date less than 30-06-2010.This macro deleteing some dates but not all of them i change the value of last to 400 but it just delete few in that iteration
Sub Test()
Dim last As Integer
Dim DaTD As Date
DaTD = DateSerial(2010, 6, 30)
last = 100
For c = 1 To last
If Range("L" & c).Value <= DaTD Then
Rows(c).EntireRow.Delete
End If
Next c
End Sub
Sub Test()
Dim last As Integer
Dim DaTD As Date
DaTD = DateSerial(2010, 6, 30)
last = 100
For c = 1 To last
If Range("L" & c).Value <= DaTD Then
Rows(c).EntireRow.Delete
End If
Next c
End Sub