Count Unique Text Values
Thanks Harlan! As usual, very interesting. However, I noticed that the
COUNT formula is very inefficient. After an informal test where I
increased the lower boundary for the range from Row 6 to Row 20000,
here's what I found...
COUNT formula ----- approximately 113 seconds to calculate
FREQUENCY formula ----- approximately 3 seconds to calculate
Although, I should mention that I'm using a Mac version of Excel. I
don't know if this makes a difference.
In article .com,
"Harlan Grove" wrote:
Domenic wrote...
Let E2 contain Jan, and F2 contain A, then try the following formula
that needs to be confirmed with CONTROL+SHIFT+ENTER...
=SUM(IF(FREQUENCY(IF($A$2:$A$6=E2,IF($B$2:$B$6=F2 ,
IF($C$2:$C$6<"",MATCH("~"&$C$2:$C$6,$C$2:$C$6&"" ,0)))),
ROW($C$2:$C$6)-ROW($C$2)+1),1))
...
There are shorter alternatives. Also an array formula,
=COUNT(1/(MATCH(""&$B$2:$B$6,IF(($A$2:$A$6=E2)*($C$2:$C$6=F 2),
""&$B$2:$B$6,0),0)=ROW($B$2:$B$6)-MIN(ROW($B$2:$B$6))+1))
|