count no of times a letter occurs in a text string

N

nishad

I would like to count the no of times a specific letter occurs in a text
string.
For eg if "My name is Amit" is in cell A1. I want to count the no of times
"m" occurs in A1, which is '3'. Plz help.
 
S

Sandy Mann

Try:

=LEN(C6)-LEN(SUBSTITUTE(UPPER(C6),"M",""))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
D

David Biddulph

Gives the answer 2 (not the 3 which the OP wanted) because SUBSTITUTE is
case-sensitive. You need a LOWER.
 

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