Count occurences of a letter in a cell

J

Jair Batista

Is there a formula to count how many letters "i" there are in a cell?
Example: if the cell contain the word "limitation", the result is 3

Thanks!
 
G

Glenn

Jair said:
Is there a formula to count how many letters "i" there are in a cell?
Example: if the cell contain the word "limitation", the result is 3

Thanks!



Total occurrences of exact case

=LEN(A1)-LEN(SUBSTITUTE(A1,B1,""))


Total occurrences of either case

=LEN(A1)-LEN(SUBSTITUTE(SUBSTITUTE(A1,LOWER(B1),""),UPPER(B1),""))
 
J

Jair Batista

Glenn said:
Total occurrences of exact case

=LEN(A1)-LEN(SUBSTITUTE(A1,B1,""))


Total occurrences of either case

=LEN(A1)-LEN(SUBSTITUTE(SUBSTITUTE(A1,LOWER(B1),""),UPPER(B1),""))


Thank you Glenn! It worked well!
Jair
 

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