HI team,
So i recorded a macro of me applying a date filter to some data. I'm trying to filter to show data between (todays date -9 days) and (todays date-5 days) it produced the code below:
ActiveSheet.Range("$A$1:$G$3952").AutoFilterField:=5, Criteria1:= _
">=3/18/2015",Operator:=xlAnd, Criteria2:="<=3/22/2015"
Unfortunately the dates are fixed so i tried to edid the code to the following:
ActiveSheet.Range("$A$1:$G$3952").AutoFilterField:=5, Criteria1:= _
>=Date - 9, Operator:=xlAnd,Criteria2:=<=Date - 5
However my syntax is off can someone help?
So i recorded a macro of me applying a date filter to some data. I'm trying to filter to show data between (todays date -9 days) and (todays date-5 days) it produced the code below:
ActiveSheet.Range("$A$1:$G$3952").AutoFilterField:=5, Criteria1:= _
">=3/18/2015",Operator:=xlAnd, Criteria2:="<=3/22/2015"
Unfortunately the dates are fixed so i tried to edid the code to the following:
ActiveSheet.Range("$A$1:$G$3952").AutoFilterField:=5, Criteria1:= _
>=Date - 9, Operator:=xlAnd,Criteria2:=<=Date - 5
However my syntax is off can someone help?