Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does anyone know how to use a variable name in these sorts
of statements? Selection.AutoFilter field:=14, Criteria1:="<*R*", Operator:=xlOr, _ ' Criteria2:="<*H*" and Selection.AutoFilter field:=14, Criteria1:="=(Blank)", Operator:=xlAnd Work for finding records that contain blanks or do not contain "R" or "H". However, given a variable for a date named "FWDATE", the statement; Selection.AutoFilter field:=10,Criteria1:"FWDATE", Operator:=xlAnd does not work. Any help would be appreciated. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Dim FWDATE as DATE FWDATE = DateValue("10/25/2003") Selection.AutoFilter field:=10,Criteria1:="" & clng(FWDATE"), _ Operator:=xlAnd Not sure what you mean by a date named FWDATE. I will assume FWDATE is a variable of type DATE that has been assigned a value. -- Regards, Tom Ogilvy "Jeff Glock" wrote in message ... Does anyone know how to use a variable name in these sorts of statements? Selection.AutoFilter field:=14, Criteria1:="<*R*", Operator:=xlOr, _ ' Criteria2:="<*H*" and Selection.AutoFilter field:=14, Criteria1:="=(Blank)", Operator:=xlAnd Work for finding records that contain blanks or do not contain "R" or "H". However, given a variable for a date named "FWDATE", the statement; Selection.AutoFilter field:=10,Criteria1:"FWDATE", Operator:=xlAnd does not work. Any help would be appreciated. |
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) | |||
Hyperlink varaible substitution - How To | Excel Worksheet Functions | |||
Passing Excel NAMED Range to VBA | Excel Worksheet Functions |