PDA

View Full Version : Sleeper: AutoFilter and criteria inarray



Cass
09-25-2005, 01:45 AM
Hello!

I stopped autofiltering to use multicriteria or somthing like that.
1. filter1 criteria col. 2
2. filter1 is on and now i need filtering col.6 but there is 2-6 different criteria
3. when filter1 and filter2 is on sum all col.10 values
4. change filter2 criteria and sum again col.10 values
thinkin right to use array?

later change filter1 criteria and repeat step 2 - 4

Cass
09-25-2005, 04:20 AM
Or maiby


edgearr = Array(30000001, 30000005, 30000009, 30000010, 30000014, 30000015)
With Worksheets(shCopi).Range("A1")
.AutoFilter field:=2, Criteria1:="0INT1205"
For j = 0 To 5
.AutoFilter field:=6, Criteria1:=edgearr(j)
sum1= ????
sum2= sum2+sum1
Next j
end with


http://vbaexpress.com/forum/images/smilies/100.gif