Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates as input to autofilter?
Hello,
I have a problem with filtering certain date due to dates that the user is supposed to give in two cells. Below are excerpt from the code; Dim FromDate As String Dim EndDate As String FromDate = Format(Worksheets("Sheet2").Range("H2").Value, "yyyy-mm-dd") EndDate = Format(Worksheets("Sheet2").Range("H3").Value, "yyyy-mm-dd") (...) MsgBox (FromDate) Selection.AutoFilter Field:=8, Criteria1:="FromDate", Operator:=xlAnd _ , Criteria2:="<EndDate" It works fine until the critera are supposed to be set. Then nothing happends. the result from the filtering is nothing (and there are data between the towo dates) Thanks, Tobias |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates as input to autofilter?
Ok, I managed to solve it myself...
"Tobias" skrev: Hello, I have a problem with filtering certain date due to dates that the user is supposed to give in two cells. Below are excerpt from the code; Dim FromDate As String Dim EndDate As String FromDate = Format(Worksheets("Sheet2").Range("H2").Value, "yyyy-mm-dd") EndDate = Format(Worksheets("Sheet2").Range("H3").Value, "yyyy-mm-dd") (...) MsgBox (FromDate) Selection.AutoFilter Field:=8, Criteria1:="FromDate", Operator:=xlAnd _ , Criteria2:="<EndDate" It works fine until the critera are supposed to be set. Then nothing happends. the result from the filtering is nothing (and there are data between the towo dates) Thanks, Tobias |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Autofilter to exclude dates | Excel Worksheet Functions | |||
autofilter using string input | Excel Programming | |||
Filtering out dates using autofilter | Excel Programming | |||
Access AutoFilter list for use with input box? | Excel Programming | |||
Autofilter input | Excel Programming |