N
news.microsoft.com
I have a table named tbl.
and column2,column3 and column4 are I want to filter on.
column2 and column3 are date-fomatted columns,
and column4 is just text-value column.
I want to filter on "AND" all conditions.
Sub Macro1()
ActiveSheet.ListObjects("tbl").Range.AutoFilter Field:=2, Operator:= _
xlFilterValues, Criteria1:=">=" & Format("2009/03/22", "yyyy/mm/dd")
ActiveSheet.ListObjects("tbl").Range.AutoFilter Field:=3, Operator:= _
xlFilterValues, Criteria1:="<=" & Format("2009/03/25", "yyyy/mm/dd")
ActiveSheet.ListObjects("tbl").Range.AutoFilter Field:=4, Operator:= _
xlFilterValues, Criteria1:="=done"
End Sub
one more,
how to address column with "name" not by column index like "Field:=2"
Thanks.
and column2,column3 and column4 are I want to filter on.
column2 and column3 are date-fomatted columns,
and column4 is just text-value column.
I want to filter on "AND" all conditions.
Sub Macro1()
ActiveSheet.ListObjects("tbl").Range.AutoFilter Field:=2, Operator:= _
xlFilterValues, Criteria1:=">=" & Format("2009/03/22", "yyyy/mm/dd")
ActiveSheet.ListObjects("tbl").Range.AutoFilter Field:=3, Operator:= _
xlFilterValues, Criteria1:="<=" & Format("2009/03/25", "yyyy/mm/dd")
ActiveSheet.ListObjects("tbl").Range.AutoFilter Field:=4, Operator:= _
xlFilterValues, Criteria1:="=done"
End Sub
one more,
how to address column with "name" not by column index like "Field:=2"
Thanks.