C
changeable
Thanks Tom,
The problem that i am facing now is the filtering results doesnt matc
my expectation.
The code works well for satisfying the (arr.Cells(i, 2) AND
(arr.Cells(i, 3)criteria (which involve field 5 in filtering) but it
fails to work while i want to satisfy the (arr.Cells(i, 4) AND
(arr.Cells(i, 5) criteria (which involve field 6 in filtering).
I'm not sure if this is correct, but it seems like it have nothing t
do with reset the autofilter .
The code:
Code
-------------------
If Not (IsEmpty(arr.Cells(i, 2)) And IsEmpty(arr.Cells(i, 3))) Then
Selection.AutoFilter Field:=5, Criteria1:=arr(i, 2), Operator:=xlAnd,
Criteria2:=arr(i, 3)
Cells(38041 + j, 6 + i).Value = Range("F38039"
-------------------
have succesfully return the value of F38039 that match field 5'
filtering at each Cells(38041 + j, 6 + i).
however the following code:
Code
-------------------
ElseIf (IsEmpty(arr.Cells(i, 2)) And IsEmpty(arr.Cells(i, 3))) Then
Selection.AutoFilter Field:=6, Criteria1:=arr(i, 4), Operator:=xlAnd,
Criteria2:=arr(i, 5)
Cells(38041 + j, 6 + i).Value = Range("F38039"
-------------------
failed to return the value of F38039 that match field 6's filtering.
attached is the problem i looks like.
the sgm8 is expected to give some value..but it doesnt.
i dont know what's goes wrong here. Can you teach me? Thanks
attached is the problem i looks like
+-------------------------------------------------------------------
|Filename: sgm8.jpg
|Download: http://www.excelforum.com/attachment.php?postid=2745
+-------------------------------------------------------------------
The problem that i am facing now is the filtering results doesnt matc
my expectation.
The code works well for satisfying the (arr.Cells(i, 2) AND
(arr.Cells(i, 3)criteria (which involve field 5 in filtering) but it
fails to work while i want to satisfy the (arr.Cells(i, 4) AND
(arr.Cells(i, 5) criteria (which involve field 6 in filtering).
I'm not sure if this is correct, but it seems like it have nothing t
do with reset the autofilter .
The code:
Code
-------------------
If Not (IsEmpty(arr.Cells(i, 2)) And IsEmpty(arr.Cells(i, 3))) Then
Selection.AutoFilter Field:=5, Criteria1:=arr(i, 2), Operator:=xlAnd,
Criteria2:=arr(i, 3)
Cells(38041 + j, 6 + i).Value = Range("F38039"
-------------------
have succesfully return the value of F38039 that match field 5'
filtering at each Cells(38041 + j, 6 + i).
however the following code:
Code
-------------------
ElseIf (IsEmpty(arr.Cells(i, 2)) And IsEmpty(arr.Cells(i, 3))) Then
Selection.AutoFilter Field:=6, Criteria1:=arr(i, 4), Operator:=xlAnd,
Criteria2:=arr(i, 5)
Cells(38041 + j, 6 + i).Value = Range("F38039"
-------------------
failed to return the value of F38039 that match field 6's filtering.
attached is the problem i looks like.
the sgm8 is expected to give some value..but it doesnt.
i dont know what's goes wrong here. Can you teach me? Thanks
attached is the problem i looks like
+-------------------------------------------------------------------
|Filename: sgm8.jpg
|Download: http://www.excelforum.com/attachment.php?postid=2745
+-------------------------------------------------------------------