Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That is 100% absolutly correct for what I wanted to do. Now my report works
exactly as I wanted. Thanks. "Nigel" wrote: Try Criteria1:="=" & StartDate -- Regards, Nigel "alskdjfhgzmxncbv" wrote in message ... I want to use a variable as the criteria for an autofilter. What I have is this: ActiveSheet.Range("$A$1:$S$277").AutoFilter Field:=1, Criteria1:="=StartDate", Operator:=xlAnd, Criteria2:="<=EndDate" where StartDate and EndDate would be assigned date values to filter between those dates. Results are no records as the variable name is used instead of the value of the variable. Variables are dim'ed as variants. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel 2007 autofilter change to 2003 autofilter functionality? | Excel Discussion (Misc queries) | |||
2007 excel autofilter back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
2007 excel autofilter change back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
autofilter with variable criteria | Excel Programming | |||
Variable in AutoFilter criteria | Excel Programming |