I have a table with 23k rows of data and there is a column with dates from 2004 to current date. Each month I need to filter and copy the current month rows into a new worksheet. I want the macro to filter a start date in cell K1 and end date in cell K2.
I cannot the after/greater than K1 and before/less than K2 to work.
This is what I have so far.
Dim day1 As String
Dim day2 As String
day1 = Sheets("Load").Range("K1").Value 'start date
day2 = Sheets("Load").Range("K2").Value 'end date
'
ActiveSheet.Range("$B$2:$H$23751").AutoFilter Field:=5, Criteria1:= _
">" & day1, Operator:=xlAnd, Criteria2:="<" & day2
I cannot the after/greater than K1 and before/less than K2 to work.
This is what I have so far.
Dim day1 As String
Dim day2 As String
day1 = Sheets("Load").Range("K1").Value 'start date
day2 = Sheets("Load").Range("K2").Value 'end date
'
ActiveSheet.Range("$B$2:$H$23751").AutoFilter Field:=5, Criteria1:= _
">" & day1, Operator:=xlAnd, Criteria2:="<" & day2