Count function for unique values in a cell


Posted by scot on December 14, 2001 3:22 PM

What function do I need to use to count the number of unique occurrences in a row of cells?

For example in column A I have the following values:

1
1
2
2
2

I want to know how many different values are in this row of numbers. The answer should return 2. What function do I need?



Posted by Mark W. on December 14, 2001 3:38 PM

=COUNT(IF(FREQUENCY(A:A,A:A),1))

...the only caveat... this will only work for
numeric values.