Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88066

How can i apply multiple filter on different value columns in excel

$
0
0

I have 3 columns A, B & C. A has the store numbers (numbers), B has the Product item codes (numerical codes) and C has its stock levels (numbers). I want to put a first filter on "B" then a second filter on "C". Inputs for both these filters will be derived from cell E1 & E2 respectively.

i tried the following code

Dim rCrit1 As Range, rCrit2 As Range, rRng1 As Range, rRng2 As Range

Set rCrit1 = Range("E1")
Set rCrit2 = Range("E2")
Set rRng1 = Range("A1:C10")
Set rRng2 = Range("A1:C10")
With rRng1
    .AutoFilter field:=2, Criteria1:=rCrit1, Operator:=xlAnd
End With
With rRng2
    .AutoFilter field:=2, Criteria1:=rCrit2, Operator:=xlBottom10Items
End With*

Viewing all articles
Browse latest Browse all 88066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>