Consider the hypothetical scenario that you are given a dataset with animals in column A
and their weights in column B
. Suppose that we want to count
the total number of unique weight values within a certain range for a specific animal. In the example below, I'm wanting to count the total number of unique Dolphin
weights between 100
and 200
. There are three unique weights: 126, 155 and 171. The duplicate weight of 126 is only counted once. The weight of 90 is ignored because it is not within the range. What custom formula can be used to solve this problem?
*This is for Excel 2016
=COUNTA(UNIQUE(FILTER(B:B,(A:A=E2)*(B:B>=E3)*(B:B<=F3))))
– chris neilsenFILTER
formula is absent from my Excel version 2016. Also, the link you posted does not include a range function which is what makes this problem uniquely difficult – oryan5000=SUMPRODUCT((A2:A11="Dolphin")/(COUNTIFS(B:B,B2:B11,A:A,"Dolphin")+(A2:A11<>"Dolphin")))
. This gives the answer as4
not3
because it doesnt exclude the one observation outside of the range. Any suggestions on how to correct this? – oryan5000