Does anyone know how to create an “AllDateinperio d” filter with dynamic dates. Autofilter only allows filtering by month and quarters, I want specific date range. I am new at VBA and need some help.
I have 5 years of data (41K rows) and want to filter for specific date ranges and show all years.
Currently I created a filter using VBA and a userform, however it only returns data for the specific date range year. I want to expand it to bring back all data no matter the year.
I have 5 years of data (41K rows) and want to filter for specific date ranges and show all years.
Currently I created a filter using VBA and a userform, however it only returns data for the specific date range year. I want to expand it to bring back all data no matter the year.
Code:
Sheets("Data").Visible = True
Sheets("Data").Select
Selection.AutoFilter
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=1, Criteria1:= _
">=" & tbStDate, Operator:=xlAnd, Criteria2:="<=" & tbEndDate
Sheets("Data").Visible = False
UserForm2.Hide
Comment