Combining 2 autofilters with an OR

B

BruceJ

I have 2 autofilters and I want to combine them with an OR
Here are the autofilters (they both are currently filtering between times)
Sub time8_11()
'
' time8_11 Macro
' Macro recorded 9/18/2003 by
'

'
Selection.AutoFilter Field:=32, Criteria1:=">.333", Operator:=xlAnd, _
Criteria2:="<=.458"
End Sub
Sub time4_930()
'


' time4_930 Macro
' Macro recorded 9/18/2003 by
'

'
Selection.AutoFilter Field:=32, Criteria1:=">.6666", Operator:=xlAnd, _
Criteria2:="<=.8953"
End Sub

Basically, it would be like:

Selection.AutoFilter Field:=32, (Criteria1:=">.6666", Operator:=xlAnd, _
Criteria2:="<=.8953"), Operator:=xlOr, (Criteria1:=">.333",
Operator:=xlAnd, _
Criteria2:="<=.458")
purpose is to look at records with times between (8am and 11am) or (4pm and
9:30pm)
But this did not work...



Thanks!
Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top