Count unique text

S

shzdug

Is there a function, or good way,to count unique text in a list? For
example, I would like an answer of 3 from the text in the list below:

Dog
Cat
Dog
Bird

Thanks!
 
D

David Billigmeier

Assume your range is A1:A10:

=SUMPRODUCT((A1:A10<>"")/COUNTIF(A1:A10,A1:A10&""))
 
R

ryguy7272

These will work too:
=SUM(IF(FREQUENCY(MATCH(A2:A11,A2:A11,0),MATCH(A2:A11,A2:A11,0))>0,1))

=SUMPRODUCT((A2:A11<>"")/(COUNTIF(A2:A11,A2:A11&"")))

=SUMPRODUCT((A2:A11<>"")/(COUNTIF(A2:A11,A2:A11)+(A2:A11="")))

=SUMPRODUCT(--(A2:A11<>""),1/COUNTIF(A2:A11,A2:A11&""))

=SUM(IF(FREQUENCY(IF(LEN(A2:A11)>0,MATCH(A2:A11,A2:A11,0),""),IF(LEN(A2:A11)>0,MATCH(A2:A11,A2:A11,0),""))>0,1))
(Note: This is a CSE Function)

Adjust all ranges to suit...
 

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