Using Two Range Criterion in Advanced Filter

B

Bull

I am trying to use two named ranges in my Advanced Filter. Below is
my code, but does not work. It only works when I has the one "SEA".
How do I
filter using two ranges?

Sub sea()
'
' sea Macro
' Macro recorded 1/10/2009 '


'
Range("A1:p99").AdvancedFilter Action:=xlFilterInPlace,
CriteriaRange:= _
Range("SEA", "SEAMORN"), Unique:=False
End Sub
 
R

ryguy7272

Just a guess here, but maybe this:
Selection.AutoFilter
Range("SEA").AdvancedFilter Action:=xlFilterInPlace, Unique:=True

Selection.AutoFilter
Range("SEAMORN").AdvancedFilter Action:=xlFilterInPlace, Unique:=True

Regards,
Ryan---
 

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

Top