D
dean.brunne
Hi,
I have used the following Advanced Filter using named ranges for the
List, Criteria and CopyToRange. The code runs but only half of the
criteria seems to work. I try the same Advanced filter manually with
the same result. What do I need to have multiple criteria work. The
criteria below works only for the Cost Centre field but not the
Company field. The Company field returns all company numbers but I
want only the one. Appreciate any help. Cheers, Dean.
CODE:
Sheets("Sheet1").Select
Range("A1").Select
Sheets("Detail").Range("Database").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Sheets("Distribution").Range("H1:I17"),
CopyToRange:=Range( _
"A1:I1"), Unique:=False
CRITERIA
Company Cost Centre
2100 4000
4010
4021
4022
4023
4025
4026
I have used the following Advanced Filter using named ranges for the
List, Criteria and CopyToRange. The code runs but only half of the
criteria seems to work. I try the same Advanced filter manually with
the same result. What do I need to have multiple criteria work. The
criteria below works only for the Cost Centre field but not the
Company field. The Company field returns all company numbers but I
want only the one. Appreciate any help. Cheers, Dean.
CODE:
Sheets("Sheet1").Select
Range("A1").Select
Sheets("Detail").Range("Database").AdvancedFilter
Action:=xlFilterCopy, _
CriteriaRange:=Sheets("Distribution").Range("H1:I17"),
CopyToRange:=Range( _
"A1:I1"), Unique:=False
CRITERIA
Company Cost Centre
2100 4000
4010
4021
4022
4023
4025
4026