Delete rows if time is greater than present time
On Saturday, December 29, 2012 5:55:12 PM UTC-8, isabelle wrote:
hi Sabisis,
Private Sub Worksheet_Activate()
Dim i As Long
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(i, 1) < Now Then Rows(i).Delete Shift:=xlUp
Next
End Sub
isabelle
Le 2012-12-29 15:48, Sabosis a écrit :
Hello-
I have a spreadsheet that has times by 1/2 hour in column A for our workday.
The spreadsheet will always have the full workday of information in it
over the past 4 weeks for the same day (last 4 Mondays, etc).
I want to be able to open this spreadsheet and delete any rows that
have a greater time in column A than the current time of the present day.
Any ideas on how this would be done?
Thank you so much!
|