Advanced Criteria range with 3 data elements

Joe Schwartz 0 Reputation points
2026-08-31T22:41:24.3+00:00

I trying to setup an advanced filter criteria range. I need 3 columns 1)DATE has to match any of the date values and both of the values in the other 2 columns. IE date of 01, 02 or 03, Code of "R", State of "PA"

I have never attempted something like this. Don't know how to set it up. I am open to 1 extract to a secondary range and a second extra from there to my report.

Thanks

Microsoft 365 and Office | Excel | For home | Windows

2 answers

Sort by: Most helpful
  1. Barry Schwarz 6,106 Reputation points
    2026-09-01T10:31:26.24+00:00

    You can use the match function to verify the date in question matches one of the desired dates. The other tow criteria a simple equality checks. You combine the three criteria using multiplication.

    For example, if the desired dates are in A1:A3, the first specified value is in B1, the second specified value is in C1, and the array to be filtered is in F1:H6, the the formula you want is

    =FILTER(F1:H6,(IFERROR(MATCH(F1:F6,A$1:A$3,0),0))*(--(G1:G6=B$1))*(--(H1:H6=C$1)))
    

    MATCH verifies the date is one of the acceptable ones.

    IFERROR replaces the non-match value with 0

    The two equality expressions convert TRUE/FALSE to 1/0.

    The product will be nonzero only if all three criteria are satisfied. Those are the rows that FILTER will select.

    Was this answer helpful?

    0 comments No comments

  2. Marcin Policht 105.3K Reputation points MVP Volunteer Moderator
    2026-09-01T00:22:36.5766667+00:00

    In Excel Advanced Filter, the criteria range works as AND across columns and OR down rows. So, if you want Date = 01-2026 OR 02-2026 OR 03-2026, while Code should be R and State PA, your criteria range should be:

    Date Code State 01-2026 R PA 02-2026 R PA 03-2026 R PA

    This tells Advanced Filter: Date is 01-2026 AND Code is R AND State is PA, OR Date is 02-2026 AND Code is R AND State is PA, OR Date is 03-2026 AND Code is R AND State is PA.

    You cannot put the three dates in separate cells under the Date column while putting R and PA only once. Excel interprets each row as a separate complete criteria set, so R and PA need to be repeated on every date row.

    If your "Date" values are actual Excel dates rather than text such as "01-2026", there is an additional issue because Excel stores dates as complete dates, such as 1/15/2026. In that case, the criteria should use date ranges rather than simply 01-2026.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.