Count of different items in a range

  • Thread starter Thread starter Dan Jurgovan
  • Start date Start date
D

Dan Jurgovan

Is there a function that will tell me how different items
I have for a range? For example:

Dan
Scott
Steve
Bill
Dan
Dan
Bill

Would give me the result of 4 for because I have 4
different names for the 7 cells in the range. Thanks in
advance.

Dan Jurgovan
 
Dan Jurgovan said:
Is there a function that will tell me how different items
I have for a range? For example:

Dan
Scott
Steve
Bill
Dan
Dan
Bill

Would give me the result of 4 for because I have 4
different names for the 7 cells in the range. Thanks in
advance.

Dan Jurgovan

Hi Dan,

Try,

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

entered using CTRL+SHIFT+ENTER

Hope this helps!
 
One way

=SUM(IF($A$2:$A$20<>"",1/COUNTIF($A$2:$A$20,$A$2:$A$20)))

Entered with Ctrl + Shift & enter
--

Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 
Back
Top