Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter Question
Good day,
I have a workbook with a sheet named 'Download' On this sheet i want to filter column C When i record what i want to happen i get the following code : Sheets("Download").Select Selection.AutoFilter Field:=3, Criteria1:="=1-1-2003", Operator:=xlAnd, Criteria2:="<31-1-2003" But when i run it, i get nothing selected. What goes wrong?? Tia Mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter Question
Selection.AutoFilter Field:=3, Criteria1:="=1-1-2003", Operator:=xlAnd,
range("yourrange").AutoFilter Field:=3, Criteria1:="=1-1-2003", Operator:=xlAnd, "geen" wrote in message news:1064433326.443335@cache2... Good day, I have a workbook with a sheet named 'Download' On this sheet i want to filter column C When i record what i want to happen i get the following code : Sheets("Download").Select Selection.AutoFilter Field:=3, Criteria1:="=1-1-2003", Operator:=xlAnd, Criteria2:="<31-1-2003" But when i run it, i get nothing selected. What goes wrong?? Tia Mark |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter Question
I believe your problem is that you are using d-m-yyyy format and vba works
with the US format Sheets("Download").Select Selection.AutoFilter Field:=3, Criteria1:="=" & cDate("1-1-2003"), _ Operator:=xlAnd, Criteria2:="<" & cDate("31-1-2003") should work. -- Regards, Tom Ogilvy "geen" wrote in message news:1064433326.443335@cache2... Good day, I have a workbook with a sheet named 'Download' On this sheet i want to filter column C When i record what i want to happen i get the following code : Sheets("Download").Select Selection.AutoFilter Field:=3, Criteria1:="=1-1-2003", Operator:=xlAnd, Criteria2:="<31-1-2003" But when i run it, i get nothing selected. What goes wrong?? Tia Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofilter Question | Excel Discussion (Misc queries) | |||
Autofilter Question | Excel Discussion (Misc queries) | |||
AutoFilter Question | Excel Discussion (Misc queries) | |||
Autofilter Question | Excel Discussion (Misc queries) | |||
Question about Autofilter... | New Users to Excel |