I have some data in excel, I want to select unique values based on multiple criteria.
The data that I have in excel is
Name Medals Year
- A 2 2017
- B 3 2018
- C 5 2018
- A 1 2016
- C 4 2017
- B 7 2018
- A 1 2017
- D 4 2016
I want to get the count of unique names who got medals >2 and <6 and year is 2017 or 2018.
So the result that I should get is 2 as B and C satisfy the criteria.
I have searched in internet about his and I got some formula using SUMPRODUCT and COUNTIFS, the formula used is
=SUMPRODUCT(1/COUNTIFS(A2:A9,A2:A9,B2:B9,">2",B2:B9,"<6",C2:C9,">2016",C2:C9,"<2019" ))
But I am getting error in this case.
Please suggest me how can I get the desired count. Thanks in advance!!
Note: This data is excerpted from huge data.