Couting occurences of different text

  • Thread starter Thread starter PG
  • Start date Start date
P

PG

Hello Excelers,

I have a column of text similar to the one shown below. I am trying
to find a way to oount the number of different occurences. In this
case, I have AAA, BBB, CCC, DDD and SSS so I am looking for a function
that would return 5. I dont want to know the number of each, just the
number of different values.

Any help would be greatly appreciated.

Paul

AAA
BBB
AAA
BBB
CCC
DDD
AAA
AAA
SSS
 
Hi Paul,
You could use this formula in B1
=IF(COUNTIF(A$1:A1,A1)=1,1,0)
and copy down with the fill-handle . Then in cell B10
=SUM(B$1:OFFSET(B10,-1,0))
 
David,

That is a great solution. Took me a second to figure out why it
worked. Very clever. Thanks all for the help.

Paul
 
Back
Top