CountIf problem

J

Jim

Is there a formula to count every occurence of a
character. The following formula counts the number of
cells with the letter 's'. =COUNTIF(A1:F35,"*s*"). I need
to have a count of all occurences of the letter 's'. So
if there is 2 's' in one cell, the count will show this.
Thanks for any help.
 
M

mzehr

Hi,
Thanks to J. Walkenbach, if you name the range
A1:F35 "data", and put the letter s in a cell, and name
that cell "text", then the following formula will work,
note that it is not case sensitive:
=(SUM(LEN(data))-SUM(LEN(SUBSTITUTE(UPPER(data),UPPER
(text),""))))/LEN(text)

if you want one that is case sensitive, use:
=(SUM(LEN(data))-SUM(LEN(SUBSTITUTE(data,text,""))))/LEN
(text)

HTH
 
J

Jim

Thanks for your help. First time using this.
-----Original Message-----
Hi
see your other post
P.S.: please don't multipost

--
Regards
Frank Kabel
Frankfurt, Germany


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top