View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Hari[_3_] Hari[_3_] is offline
external usenet poster
 
Posts: 157
Default Genarating count of unique words in a cell or cells

Hi Tim,

Thanks a lot for persisting with me. It works great now.

Just wanted to SHARE this with you.

Presently in the column C am getting count of a particular unique word by
summing each instance of its occurence in the Column A.
In Column D I wanted to see the count of unique word by summing the number
of rows within column A that it appears.

What I mean is if in cell A1, A2 the response is :-
A1 - "VC++"
A2 - "I use VC++, Cobol, Fortran. But mainly I use VC++"
A3 - "I use Basic"

Then the answers I get in Column C is

VC++ 3
I 3
use 3
Cobol 1
Fortran 1
But 1
mainly 1
Basic 1


In column D I desired an output as given below.

VC++ 2
I 2
use 2
Cobol 1
Fortran 1
But 1
mainly 1
Basic 1


The difference between column C and D is that if a unique word is found more
than once within the same row then it is counted only once. Like in A2 "I",
"VC++", "Use" , appears twice within the same row so its WEIGHTAGE in the
global count is given only once. So, In effect the count of unique words is
done by summing the number of rows within column A that it appears.

For accomplishing that in cell D1 I wrote the following formula (array
formula)

{=SUM(IF(ISERROR(FIND(B2,$A$1:$A$8)),0,1))} and thankfully I am able get the
result.

I think by perusing newsgroup posts am learning (albeit slowly) to control
array formulas a little better.

Thanks to all you folks who support us.
--
Regards,
Hari
India