• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Filtering multiple values in one column?

hreyo25

New Member
Hello all I am trying to set up a spead sheet that will filter multiple values in one column. I have figured out a way to filter one value, but am stuck filtering more then one.
I am using the code below.

For example:
ActiveSheet.Range("$A$6:$T$15000").AutoFilter Field:=1, Criteria1:= _
"=Square*", Operator:=xlAnd

this will filter anything that starts with the word square. How would i get to filter out the cells with the word Square and Circle. Any help would be appreciated.
 
Hi Hreyo25,

Change your line of code with this.

Code:
ActiveSheet.Range("$A$6:$T$15000").AutoFilter Field:=1, Criteria1:= _
"=Square*",  Operator:=xlOr, Criteria2:="=Circle*"
 
Back
Top