Hi,
I am trying to put together a simple macro to filter a table for rows containing today's date (column 1) and where the value in column 5 is greater than 5. However, when I run it all rows disappear even though there are many that meet the criteria.
Can anyone see what the problem is?
Thanks
I am trying to put together a simple macro to filter a table for rows containing today's date (column 1) and where the value in column 5 is greater than 5. However, when I run it all rows disappear even though there are many that meet the criteria.
Can anyone see what the problem is?
Thanks
VBA Code:
Sub Filter()
ActiveSheet.ListObjects("TTable").Range.AutoFilter Field:=1, Criteria1:=Array(Date), Operator:=xlFilterValues
ActiveSheet.ListObjects("TTable").Range.AutoFilter Field:=5, Criteria2:=">5", Operator:=xlFilterValues
End Sub