tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,926
- Office Version
- 365
- 2019
- Platform
- Windows
Column A contains these values:
I want to filter some values, so use this:
which indeed does return the values a and b only.
Question 1.
Why does this return no values?
Question 2.
In reality, I want to filter on a number of criteria, eg: "a", "b", "c", ..... , "z", "aa", etc. so need to create an array (or possibly some other method).
Thanks
Rich (BB code):
Name
a
b
c
d
e
I want to filter some values, so use this:
Rich (BB code):
Range("A1).AutoFilter Field:=1, Criteria1:=Array("a", "b"), Operator:=xlFilterValues
which indeed does return the values a and b only.
Question 1.
Why does this return no values?
Rich (BB code):
Dim MyString As String
MyString = "a""" & ", " & """b"
Range("A1).AutoFilter Field:=1, Criteria1:=Array(MyString), Operator:=xlFilterValues
In reality, I want to filter on a number of criteria, eg: "a", "b", "c", ..... , "z", "aa", etc. so need to create an array (or possibly some other method).
Thanks