Count Unique Values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to count the unique values, but no need to specify a certain
value.Please see the columns below:
c1 c2
a a
b b
a a
a a
a a
b c

There are 2 unique values in this c1 (a,b),so i want the result to be 2.In
c2,the result should be 3,because there are 3 unique values(a,b,c). I need a
formula which can count how many unique values appear in a column. Since I
don't know which value will appear in the column, I can not specify the exact
value neither use the COUNTIF formula.
Thanks for your help:)
 
annie said:
I want to count the unique values, but no need to specify a certain
value.Please see the columns below:
c1 c2
a a
b b
a a
a a
a a
b c

There are 2 unique values in this c1 (a,b),so i want the result to be 2.In
c2,the result should be 3,because there are 3 unique values(a,b,c). I need a
formula which can count how many unique values appear in a column. Since I
don't know which value will appear in the column, I can not specify the exact
value neither use the COUNTIF formula.
Thanks for your help:)

=SUMPRODUCT((Range<>"")/COUNTIF(Range,Range&""))

If you have the morefunc.xll add-in...

=COUNTDIFF(Range,FALSE,"")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top