View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Counting text in a column

In B1 add = A1
In C1 add =IF(B1="","",(" = "&COUNTIF(A:A,A1)))
In B2 add
=IF(ISERROR(MATCH(0,COUNTIF(B$1:B1,$A$1:$A$20&""), 0)),"",
INDEX(IF(ISBLANK($A$1:$A$20),"",$A$1:$A$20),MATCH( 0,COUNTIF(B$1:B1,$A$1:$A$2
0&""),0)))

which is an array formula, so commit with Ctrl-Shift-Enter

Copy B2 down, and C1 down.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"prom4x" wrote in
message ...

I used to think I was good at Excel until this stumped me.

I have a column with a variety of text in each cell.

Example:

A1
bob
bob
ted
ted
ted
charley
charley
charley
charley, etc.

Is there a formula or way I can take the whole column of data and have
it come back with something similar to:
bob = 2
ted=3
charley=4
etc.

for all the variables in the column?

Please help, I am dying over here.


--
prom4x
------------------------------------------------------------------------
prom4x's Profile:

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