View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Domenic[_2_] Domenic[_2_] is offline
external usenet poster
 
Posts: 265
Default Counting unique values in column

In article ,
WildWill wrote:

I have a column containing text values which could be unique, repetitive or
some rows could be empty. I need a formula that will count the total number
of unique values only, (not counting the empty cells) e.g. in the example
below, the answer will be "3":

Column A
Fish
Fish
(Empty)
Chicken
Rat
Chicken
(Empty)


Here's another way...

=SUM(IF(FREQUENCY(IF(A2:A100<"",MATCH("~"&A2:A100 ,A2:A100&"",0)),ROW(A2:
A100)-ROW(A2)+1),1))

....confirmed with CONTROL+SHIFT+ENTER.

--
Domenic
http://www.xl-central.com