Hello All
I have:
dim r as long
What I am trying to do, and not working as usual, Is drop to the bottom of Column B,
Work back up one row at at a time
delete each entire row with a date stamp of greater than 3:00 in the morning
For example, lets say "B47" has a date stamp of 03:01:00 AM, then that row would be deleted because it is greater than 03:00:00 AM.
There is a catch, once the code got to the first 03:00:00, it would stop, if not, it would continue up and delete many rows I need.
So, if the code goes to the bottom of a date (In column A) of say 1-11-2022. it would stop deleting at that date when it got to 1-11-2022 at 03:00:00
Can someone help please
I have:
dim r as long
VBA Code:
With Sheets("HV-3")
For r = sht.Cells(sht.Rows.Count, "B").End(xlUp)
If (sht.Cells(r, "B").Value) >= "03:00:00 AM" Then sht.Rows(r).Delete
End If
Next r
End With
Next sht
What I am trying to do, and not working as usual, Is drop to the bottom of Column B,
Work back up one row at at a time
delete each entire row with a date stamp of greater than 3:00 in the morning
For example, lets say "B47" has a date stamp of 03:01:00 AM, then that row would be deleted because it is greater than 03:00:00 AM.
There is a catch, once the code got to the first 03:00:00, it would stop, if not, it would continue up and delete many rows I need.
So, if the code goes to the bottom of a date (In column A) of say 1-11-2022. it would stop deleting at that date when it got to 1-11-2022 at 03:00:00
Can someone help please