I would like to create a named range that is dependent on 2 conditions. I have written the code that creates a list based on Criteria 1 being "aa" as in the example. I would like to create the same list that uses "aa" but also has a "y" in criteria 2. Attached a picture for clarity. Here is the formula used for the first criteria:
=OFFSET(INDEX(C2:C13,MATCH("aa",A2:A13,0),0),0,0,COUNTIF(A2:A13,"aa"),1)

Best ist Filter function, if you have:
otherwise the orange solution with a few helper columns: