View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter Grebenik[_2_] Peter Grebenik[_2_] is offline
external usenet poster
 
Posts: 9
Default Not filtering by date

You use the operator:=xlAnd to have a joint criteria on a single
column, not to use filter criteria on two different columns.
So replace your filterrange code with

with FilterRange
..AutoFilter Field:=1, Criteria1:=Class,
..AutoFilter Field:=9, Criteria1:="=" & cdbl(myDate)
end with

Peter