chirayu
Well-Known Member
Hi Guys,
Basically I'm trying to speed up my code so need a faster way to delete rows.
Essentially the date criteria I use is anything that is less than "Date - 31"
Note that I am referencing dates starting cell AG6
Also note that since not every cell has a date I use column A as the IsEmpty() check for the Do Until loop
----------------------------------------------------------------------------------------
Thread moved to appropriate forum. - Chihiro
Basically I'm trying to speed up my code so need a faster way to delete rows.
Essentially the date criteria I use is anything that is less than "Date - 31"
Note that I am referencing dates starting cell AG6
Also note that since not every cell has a date I use column A as the IsEmpty() check for the Do Until loop
Code:
'Delete rows less than Today minus 31
Range("AG6").Select
Application.ScreenUpdating = False
Do Until IsEmpty(Range("A" & Activecell.Row))
If Activecell <> "" And Activecell < (Date - 31) Then
Activecell.EntireRow.Delete
Else
Activecell.Offset(1, 0).Select
End If
Loop
Application.ScreenUpdating = True
Thread moved to appropriate forum. - Chihiro
Last edited by a moderator: