to count an alphabet in a cell

  • Thread starter Thread starter Rajesh Kamath
  • Start date Start date
R

Rajesh Kamath

Hi,

Can someone help me,

my issue is, if for example there is text entered in one cell like
"aabcd" .I want to count the number time "a" appearing in the cell.

Thanks

Rajesh Kamath
 
Rajesh, here is one way, =SUM(LEN(A1))-SUM(LEN(SUBSTITUTE(A1,"a","")))
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
With a string of 8 or les characters, this works:
=SUM(--(MID(A1,{1,2,3,4,5,6,7,8},1)="a"))
Enter it as array formula using SHIFT+CTRL+ENTER
best wishes
 
Really no need for the SUM() function:

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

Also, to make it easier to change, you could assign a cell to enter the
character(s) that you wish to count, say D1:

=LEN(A1)-LEN(SUBSTITUTE(A1,$D$1,""))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



Rajesh, here is one way, =SUM(LEN(A1))-SUM(LEN(SUBSTITUTE(A1,"a","")))
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 

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

Back
Top