Hi
After a couple of research I found a code that in theory works with an array of values that define the filter criteria to work with, when I tested as I download it it worked, however when I change those to the values I need, the filter result went blank, so this where I need the assistance I know the code works, but I'm struggling try to find out why it didn't with the change I need
where CritList is a dynamic range name given by the following
CritHead =Lists!$B$1
CritList =OFFSET(CritHead;1;0;COUNTA(Lists!$B:$B)-1;1)
PS I have the dummy file, but I kind of lost on how to attach it
After a couple of research I found a code that in theory works with an array of values that define the filter criteria to work with, when I tested as I download it it worked, however when I change those to the values I need, the filter result went blank, so this where I need the assistance I know the code works, but I'm struggling try to find out why it didn't with the change I need
Code:
Sub FilterRangeCriteria()
Dim vCrit As Variant
Dim wsO As Worksheet
Dim wsL As Worksheet
Dim rngCrit As Range
Dim rngOrders As Range
Set wsO = Worksheets("Orders")
Set wsL = Worksheets("Lists")
Set rngOrders = wsO.Range("$A$1").CurrentRegion
Set rngCrit = wsL.Range("CritList")
vCrit = rngCrit.Value
rngOrders.AutoFilter _
Field:=4, _
Criteria1:=Application.Transpose(vCrit), _
Operator:=xlFilterValues
End Sub
where CritList is a dynamic range name given by the following
CritHead =Lists!$B$1
CritList =OFFSET(CritHead;1;0;COUNTA(Lists!$B:$B)-1;1)
PS I have the dummy file, but I kind of lost on how to attach it
Last edited: