Hi all, I need help here.
I've been trying this for hours and can't find a solution to this.
What I have is a set of data and I'm filtering to find out all data between a range of dates.
the Criteria would be anything that is >=today() and <=today-8.
this is what i have done and it does not work at all. please help
Sheets(2).Select
Dim dDate As Date
Dim lDate As Date
Range("N2").Value = "=today()"
Range("o2").Value = "=today()-8"
dDate = Range("N2")
lDate = Range("O2")
Range("A1").AutoFilter
Range("A1").AutoFilter Field:=10, Criteria1:=">=" & lDate, Operator:=xlAnd, Criteria2:="<=" & dDate
I've been trying this for hours and can't find a solution to this.
What I have is a set of data and I'm filtering to find out all data between a range of dates.
the Criteria would be anything that is >=today() and <=today-8.
this is what i have done and it does not work at all. please help
Sheets(2).Select
Dim dDate As Date
Dim lDate As Date
Range("N2").Value = "=today()"
Range("o2").Value = "=today()-8"
dDate = Range("N2")
lDate = Range("O2")
Range("A1").AutoFilter
Range("A1").AutoFilter Field:=10, Criteria1:=">=" & lDate, Operator:=xlAnd, Criteria2:="<=" & dDate