Results 1 to 9 of 9

Filter using "not equal to" criteria using array

Threaded View

AlaaAlii Filter using "not equal to"... 05-10-2012, 06:14 AM
kvsrinivasamurthy Re: Filter using "not equal... 05-10-2012, 07:06 AM
AlaaAlii Re: Filter using "not equal... 05-10-2012, 09:04 AM
AlaaAlii Re: Filter using "not equal... 05-11-2012, 06:01 AM
JosephP Re: Filter using "not equal... 05-11-2012, 06:13 AM
AlaaAlii Re: Filter using "not equal... 05-11-2012, 06:35 AM
JosephP Re: Filter using "not equal... 05-11-2012, 06:45 AM
AlaaAlii Re: Filter using "not equal... 05-11-2012, 07:02 AM
JosephP Re: Filter using "not equal... 05-11-2012, 07:14 AM
  1. #1
    Registered User
    Join Date
    04-09-2012
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Filter using "not equal to" criteria using array

    Hello. My current filter is this:
    'Select all the data
    Range(Cells(1, 1), Cells.SpecialCells(xlCellTypeLastCell)).Select
    'Apply filter
        With Selection
            .AutoFilter Field:=9, Criteria1:=StaffArray, Operator:=xlFilterValues
        End With
    The "StaffArray" contains 29 entries.
    What I want is to filter and show whatever is NOT in the staff array. I tried all sorts of syntax like:
            .AutoFilter Field:=9, Criteria1:=<>StaffArray, Operator:=xlFilterValues
            .AutoFilter Field:=9, Criteria1:=<> &StaffArray, Operator:=xlFilterValues
            .AutoFilter Field:=9, Criteria1:="<>" &StaffArray, Operator:=xlFilterValues
    But all of them returned errors.
    From doing some search, people were mentioning something along the lines of "use a formula column to determine whether to include or exclude the values". Maybe they mean this: create some kind of formula that uses the "StaffArray" and searches the field/column in question, and then creates another array containing the values that are not the same as in "StaffArray"... Am I making any sense? If yes, then how do I do this?

    I'm only looking for a solution; i.e. it doesn't have to be optimized to run fast.
    Last edited by AlaaAlii; 05-10-2012 at 09:05 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1