• 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.

exclude Dynamic arrays from autofilter

Miteshkg

New Member
Hi Team,

I've created a range and value of the same is passed to Data array() dynamic. With the below code, I am able to autofilter the column with contents of array.

Ws.Range("C9").AutoFilter 2, Data, xlFilterValues

However, what I want is exclude the array values in autofilter. i.e, something like

Ws.Range("C9").AutoFilter 2, <>Data, xlFilterValues

Please help me.
 
Simple answer. You can't.

Microsoft didn't implement FilterOutValues option. <> will only work up to 2 items only.

You can work around it by constructing array elements to show, using your Data array.
 
Back
Top