C
Carrie_Loos via OfficeKB.com
Hi -
Is there a way to state a criteron range in an advanced filter? I cannot
figure out the syntax if there is. Please see below on the filter as I have
placed a "Range" in the filter that obviously doesn't work but is there a way
to make it work?
Thanks
Carrie
Private Sub ListBox1_Click()
Dim UserInput As Range
Dim UserInput2 As Range
Set UserInput = Worksheets("Keys").Range("K9")
Set UserInput2 = Worksheets("Keys").Range("K10")
Range("UserInput") = ListBox1.Value
For i = 1 To ListBox1.ListCount - 1
Range("UserInput2") = ListBox1.Selected(i)
Next
Sheets("Classes").Select
Selection.AutoFilter Field:=6, Criteria1:="Range.UserInput", Operator:
=xlAnd
Is there a way to state a criteron range in an advanced filter? I cannot
figure out the syntax if there is. Please see below on the filter as I have
placed a "Range" in the filter that obviously doesn't work but is there a way
to make it work?
Thanks
Carrie
Private Sub ListBox1_Click()
Dim UserInput As Range
Dim UserInput2 As Range
Set UserInput = Worksheets("Keys").Range("K9")
Set UserInput2 = Worksheets("Keys").Range("K10")
Range("UserInput") = ListBox1.Value
For i = 1 To ListBox1.ListCount - 1
Range("UserInput2") = ListBox1.Selected(i)
Next
Sheets("Classes").Select
Selection.AutoFilter Field:=6, Criteria1:="Range.UserInput", Operator:
=xlAnd