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
So if this is your data:
The formula used in E9
:
{=SUM(--(FREQUENCY(IF((B2:B9>2)*(B2:B9<6)*(C2:C9>2016)*(C2:C9<2019),MATCH(A2:A9,A2:A9,0)),ROW(A2:A9)-ROW(A2)+1)>0))}
See here for more in depth explaination.
Another option would be to use a pivot-table with
Year filtered as as >=2017
Name Values between 2
and 6
Which yields the following result:
and then we simply count unique values (excluding blank cells <>""
)
Would say this formula is a bit more user-friendly and makes for a better visual representation of the data, but if you just want a formula, then absolutely go for @JvdV's solution :)