Bill Martin -- (Remove NOSPAM from address)
Guest
Re: filter by more than 2 criteria
Alex wrote:
> I'm applying the following filtering:
> Worksheets("Sheet1").Select
>
> Selection.AutoFilter Field:=1, Criteria1:="=ERP", Operator:=xlOr, _
> Criteria2:="=PM" ' Working well
>
> But, I need more criterias there such as:
>
> Selection.AutoFilter Field:=1, Criteria1:="=ERP", Operator:=xlOr, _
> Criteria2:="=PM" ', Operator:=xlOr, Criteria3:="=HPW" , _
> Operator:=xlOr, Criteria4:="=OJT", _
> Operator:=xlOr, Criteria5:="=SBR", _
> Operator:=xlOr, Criteria6:="=LD", _
> Operator:=xlOr, Criteria7:="=CFT"
>
> How could I do it?
>
> Thanks
>
The way it's been done since the beginning of computer science is to sort on the
least significant field first. Then do it again with the next least, and so
forth until you're done. This is pretty much what any sorting software you'll
find will do under the covers to handle multiple keys.
Bill
Bookmarks