View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Totaling the number of comma delimited numbers in a column

Hi!

Assume the numbers are in the range A1:A10.

In C1 enter 11.

In D1 enter this formula:

=SUMPRODUCT(LEN(A$1:A$10)-LEN(SUBSTITUTE(A$1:A$10,C1,"")))/2

Select both C1 and D1 and drag copy down to row 46.

Biff

"Glynn Furr" wrote in message
...
I have a column which has a variable number of comma delimited values in
the range of 11 to 56 in each cell. Is there a method or macro to count the
occurrences of each number in the column and either output the results to a
file or another worksheet?

Example:
23,40,52,31,
42,14,
56,
27,43,19,
etc.

What I am doing now is coping the column to Word, closing the margins to 3
characters, coping that result to an clean worksheet, sorting the new
column ascending and printing the results and counting the occurrences
manually. This is getting tedious as the column grows in length.

Can anyone help me or point me to a solution?

Thanks in advance!

Glynn ..

OT: isn't there a program to sort a comma delimited ASCII numeric file?
Seems like I remember one from the DOS days.