我有以下VBA脚本,我希望根据第3列进行过滤 - StartDate:
Sub RemDates()
Dim RowToTest As Long
Dim ws As Worksheet
For Each ws In ThisWorkbook.Sheets
For RowToTest = ws.Cells(Rows.Count, 3).End(xlUp).Row To 1 Step -1
With ws.Cells(RowToTest, 3)
If .Value > #12/24/2016# _
And .Value < #12/29/2016# Then _
ws.Rows(RowToTest).EntireRow.Delete
End With
Next RowToTest
Next
End Sub
但这不能正常工作。以下是我的电子表格(我想要过滤)的屏幕截图。
任何提示表示赞赏,谢谢