Hello All
I have a large data set, and I'm trying to delete all rows in column A with the year of 2020 and before...basically leaving only 2021.
the data set is in the format (in column A) as: 2020-3-24:6_19_53 meaning 3-24-2020 with a time of hh:mm:ss or 6:19 and 53 seconds in the morning, on March 24, 2020
Also, Row 1 is a Header Row, and should not be deleted.
Below is the code I'm trying to use...and of course it's not working.
Can someone help please?
thanks for the help
I have a large data set, and I'm trying to delete all rows in column A with the year of 2020 and before...basically leaving only 2021.
the data set is in the format (in column A) as: 2020-3-24:6_19_53 meaning 3-24-2020 with a time of hh:mm:ss or 6:19 and 53 seconds in the morning, on March 24, 2020
Also, Row 1 is a Header Row, and should not be deleted.
Below is the code I'm trying to use...and of course it's not working.
Can someone help please?
thanks for the help
VBA Code:
With Sheets("Spray Booth 1")
With .Range("A2", .Range("A" & Rows.Count).End(xlUp))
.AutoFilter 1, "=2020"
.Offset(1).SpecialCells(xlVisible).EntireRow.Delete
End With
.AutoFilterMode = False
End With