View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Count different values in a column

=COUNTIF(A:A,B1)

in column C

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Kaziglu Bey"
wrote in message
...

I would like some help on a macro that would count the number of times a
value appears in a column as well as seperate all the values in a
seperate column.

Example:

Column A might have the values

ABC123
ABC123
ABC123
BCC123
BCC123
CBB123

Thus, column B would have the values:

ABC123
BCC123
CBB123

And column C would have the values

3
2
1

I would effectively be able to determine the total different number of
values in the column as well as the number of times each value appears
in the column.

Using the CountIf formula, I can determine the number of times each
value appears in a column, but I am unable to determine the number of
different values.

Thanks.


--
Kaziglu Bey
------------------------------------------------------------------------
Kaziglu Bey's Profile:

http://www.excelforum.com/member.php...o&userid=36086
View this thread: http://www.excelforum.com/showthread...hreadid=573793