Hi,

Please help me with a macro that will filter a data table based on the value of a cell with a date (mm/dd/yy)

The filter area is on column "B:B" and the reference for the filter is on another sheet on cell "C5"

Here's the code that I tried

Sub (Filter)
'filters date to match with selection

sheets("Data").select
Range("B3:T3").select
selection.autofilter

Activesheet.Range("B3:T99").Autofilter Field: =1, Criteria:= Sheets("Formulas and Tables").Range("C5")
End Sub
I am having an error with this line:

ActiveSheet.Range("B3:T99").AutoFilter Field:=1, Criteria:=Sheets("Formulas and Tables").Range("C5")
What is the correct way of doing this?

Thank you for your help