Consulting

Results 1 to 3 of 3

Thread: Solved: Autofilter in reverse

  1. #1
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location

    Solved: Autofilter in reverse

    is there a way to use the autofilter to show all but one criteria without a literal criteria array of all the other options? im also not trying to delete the information i dont need so i cant just filter it out...

    [VBA]
    ActiveSheet.Range("$A$1:$BZ$4839").AutoFilter Field:=51, Criteria1:=Array( _
    "$10,140.93", "$10,299.10", "$11,038.13", "$11,113.00", "$11,319.53", "$11,621.24", _
    "$11,834.87", "$15,039.90", "$18,898.30", "$2,071.63", "$2,367.92", "$20,630.29", _
    "$21,854.80", "$277.00", "$339.29", "$350.00", "$4,711.08", "$4,923.08", "$447.51", _
    "$493.18", "$5,294.90", "$5,918.76", "$7,306.22", "$7,548.52", "$7,553.37", _
    "$7,773.27", "$7,779.43", "$7,877.72", "$7,966.80", "$8,084.30", "$8,473.06", _
    "$8,745.96", "$9,034.72", "$9,213.64", "$9,231.61", "$9,344.96", "$9,935.11"), _
    Operator:=xlFilterValues
    [/VBA]


    im looking for something more like this:

    [VBA]
    ActiveSheet.Range("$A$1:$BZ$4839").AutoFilter Field:=51, _
    Criteria1:= [all but $0.00], _
    Operator:=xlFilterValues
    [/VBA]

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    [vba]
    ActiveSheet.Range("$A$1:$BZ$4839").AutoFilter Field:=51, _ Criteria1:= "<>0", _
    Operator:=xlFilterValues
    [/vba]

    Paul

  3. #3
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location
    Quote Originally Posted by Paul_Hossler
    [vba]
    ActiveSheet.Range("$A$1:$BZ$4839").AutoFilter Field:=51, _ Criteria1:= "<>0", _
    Operator:=xlFilterValues
    [/vba]

    Paul
    thank youuuuuuuuu

Posting Permissions

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