EXCEL-Counting unique values.

F

Frank Garbe

Is there a way to count the number of uniques values in a
range. For example, if a range contains the values:
a,a,a,b,c,c,d,d,d

Is there a way to count so I know there are 4 unique
values?
 
R

Ron Rosenfeld

Is there a way to count the number of uniques values in a
range. For example, if a range contains the values:
a,a,a,b,c,c,d,d,d

Is there a way to count so I know there are 4 unique
values?

If the values are in A1:A9, then the *array-entered* formula:

=SUM(1/COUNTIF(A1:A9,A1:A9))

To array-enter, hold down <ctrl><shift> while hitting <enter>. XL will place
braces {...} around the formula.

Another way is to download the morefunc add-in from:
http://perso.wanadoo.fr/longre/excel/pages/Downloads.htm#Morefunc.xll

and use the COUNTDIFF function. The add-in is free, and has many useful
functions.


--ron
 

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

Top