+ Reply to Thread
Results 1 to 3 of 3

Multiple Criteria for Autofilter using And & Or

  1. #1
    Registered User
    Join Date
    06-13-2011
    Location
    Neston, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    38

    Multiple Criteria for Autofilter using And & Or

    Hi I am getting a compilation error stating 'Application-defined or Object-defined error' on the following statement

    Please Login or Register  to view this content.
    Filter_Range is variable for the range and is set OK (there are multiple other filters applied before and after which work fine)
    C_DUEDATE is a constant for the Column Number
    ds is date start as a date serial, de is date end as date serial

    My feeling is the error is something to do with mixing And and Or in same filter? is there any way of 'adding brackets' it should be value = N/A or (>=ds and <=de) but not sure exactly how to do this?

    Alternatively is there a filter add. So I could filter out the date range and then add any that are N/A

    Help as always much appreciated.
    Last edited by Wongadob; 07-18-2011 at 01:40 PM. Reason: To Flag as solved - Need to find another solution

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: Multiple Criteria for Autofilter using And & Or

    There are only 2 criteria allowed in an autofilter. Perhaps you could use an advanced filter instead? If you do need autofilter, you'll need an additional formula column that checks your three criteria and then filter on the new column.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    06-13-2011
    Location
    Neston, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    38

    Re: Multiple Criteria for Autofilter using And & Or

    Thanks,

    That would explain it then. Back to the drawingboard

+ Reply to Thread

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