How do I make this work? My code is:
Selection.AutoFilter Field:=1, Criteria1:=">=WBDate", Operator:=xlAnd, _
Criteria2:="<=WEDate"
WBDate is a cell that contains a beginning date
WEDate is a cell that contains an ending date
Both cells are vlookups and are formated as dates
AutoFilter Field 1 is the 1st column in my data and contains only dates
The code seems to work, except it says there's no records in my data that are between the two date ranges. That's not true. Can you not use a cell name as criteria in AutoFilter?
Selection.AutoFilter Field:=1, Criteria1:=">=WBDate", Operator:=xlAnd, _
Criteria2:="<=WEDate"
WBDate is a cell that contains a beginning date
WEDate is a cell that contains an ending date
Both cells are vlookups and are formated as dates
AutoFilter Field 1 is the 1st column in my data and contains only dates
The code seems to work, except it says there's no records in my data that are between the two date ranges. That's not true. Can you not use a cell name as criteria in AutoFilter?