+ Reply to Thread
Results 1 to 4 of 4

Excel 2003 Multi Criteria filter in VBA

  1. #1
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Excel 2003 Multi Criteria filter in VBA

    Hi Excel Experts,

    I wrote the following code to filter out blanks and zeros in my worksheet. The macro works perfectly when using excel 2010, however, it does not work with Excel 2003 because of this line. It's because Excel 2003 doesn't let you filter multiple criteria. Is it possible to modify the code to filter multiple criteria using excel 2003?


    Selection.AutoFilter Field:=2, Criteria1:="=$0.00", _
    Operator:=xlOr, Criteria2:="="

    Please Login or Register  to view this content.
    Last edited by alexduy; 06-27-2013 at 02:30 AM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Excel 2003 Multi Criteria filter in VBA

    Tested with Excel 2003

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Re: Excel 2003 Multi Criteria filter in VBA

    Thank you so much!

  4. #4
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Re: Excel 2003 Multi Criteria filter in VBA

    Hi AlphaFrog,

    The code you gave me work perfectly with the previous worksheet, however, when I tried to using the same code with another data table, it does not work. I added a third criterion and the macro breaks. I've attached another worksheet. Could you please help me modified the code? Thank you very much, I appreciate your help.

    .AutoFilter Field:=1, Criteria1:="=System:", _
    Operator:=xlOr, Criteria2:="Services", _
    Operator:=xlOr, Criteria3:="Inactive"

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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