count number of specified text within a text/cell

V

Vikas Kumar

Hi
wanted to know the number of specified character/text in a word/sentence/cell.
*example:
i want to know the number of "a" used in the word "Ramchandrapura".
answer(retuns) should be:- 4

* Please help me to get the same through formula/VB code....etc.
Regards
Vikas Kumar.
 
K

Kevin B

=LEN(A1) returns the number of characters in cell A1. Change the cell
address accordingly.
 
R

Ron Rosenfeld

Hi
wanted to know the number of specified character/text in a word/sentence/cell.
*example:
i want to know the number of "a" used in the word "Ramchandrapura".
answer(retuns) should be:- 4

* Please help me to get the same through formula/VB code....etc.
Regards
Vikas Kumar.

=len(a1) - len(substitute(a1,"a",""))


--ron
 
Top