
I want to get the count of names with diagnosis 2 and drug A or any combination of the two from the data set, but the criteria column is a mix of different criteria. I know that what I basically need to do is a COUNTIFS where one of the criteria range is an array, but I'm not sure how to get the initial array of Names.
For Cell F6:
=COUNTIFS(Criteria,"Drug",Value,"A",Names,ArrayOfNamesWithDiagnosis2)
Where Criteria is A2:A12, Value is B2:B12,Names is C2:C12, and ArrayOfNamesWithDiagnosis2 is the list of the names that have diagnosis 2.
