+ Reply to Thread
Results 1 to 2 of 2

Autofilter Critera

  1. #1
    Forum Contributor
    Join Date
    06-17-2013
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    247

    Autofilter Critera

    Is there a way in VBA to have criteria not selected instead of criteria selected?

    e.g I want to remove XED From field 3 which returns in VBA as :
    ActiveSheet.Range("$A$1:$F$1000").AutoFilter Field:=3, Criteria1:=Array( _
    "ADL", "AMS", "BJS", "BNE", "FLR", "HHQ", "HNL", "INH", "INV", "IST", "LON", "LVI", "MCY", _
    "MEL", "MIL", "MPM", "MQP", "PRG", "RAR", "SFP", "SMY", "SNB", "SYD", "SZG", "VFA", "WSY", _
    "ZAG", "ZOL", "ZZZ", "="), Operator:=xlFilterValues

    Because that is the criteria it is matching against, however not all codes are on this reportand im only wanting "XED" to be removed from criteria if it is on there... is there a way to do this?

    IN Other words - Instead of setting the criteria for the filter, setting the criteria that shouldn't be in the filter.
    Last edited by 13lack13lade; 11-06-2013 at 09:15 PM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Autofilter Critera

    Are you referring to does not =?

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HELP: VBA Autofilter criteria, between two dates critera will not recognize "<>"
    By csichel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-13-2013, 06:21 PM
  2. Remove Critera from an autofilter
    By barrfly in forum Excel General
    Replies: 4
    Last Post: 01-10-2011, 02:57 PM
  3. AutoFilter method of Range class failed - Yet autofilter works.
    By Carlsbergen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2009, 05:43 PM
  4. Capturing the Excel AutoFilter Sorting Event-sort and autofilter options
    By Kognyto in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2008, 05:36 PM
  5. [SOLVED] How do I sum with two critera?
    By Clare in forum Excel General
    Replies: 4
    Last Post: 08-24-2005, 10:05 AM

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