View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
steve steve is offline
external usenet poster
 
Posts: 576
Default frequency of characters within a string

Dave,

Good One! That's what I call thinking out of the box!

steve

"Dave" wrote in message
. au...

"Nick" wrote in message
...
I wish to to count the frequency of a character wthin a
string. Does anyone have any idea how this is possible?

My best guess so far is to create a loop using
application.worksheetfunction.find but this is rather
tedious.

Does anyone know if there is a function which will do it
for me? I have spent ages in the help files but cant find
much.

I know application.worksheetfunction.frequency is similar
to what I want but it needs an array entered into it
whilst I need to input cells(x, y).value

Any help would be much appreciated


If you want to do it in a normal function you could use a formula such as
=LEN(A1)-LEN(SUBSTITUTE(A1,"b",""))
to count the frequency of "b" characters in a string in cell A1

Cheers

Dave