ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting specific letters in a cell (https://www.excelbanter.com/excel-worksheet-functions/193613-counting-specific-letters-cell.html)

Sandy

Counting specific letters in a cell
 
How do I count the number of specific letters in a given cell? For example
if a cell has the words "Have a nice day!" I would only want to count only
the letter "a." Is there some sort of IF-LEN-combo function? Help.

Pete_UK

Counting specific letters in a cell
 
Try this:

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

Hope this helps.

Pete

On Jul 3, 4:35*pm, Sandy wrote:
How do I count the number of specific letters in a given cell? *For example
if a cell has the words "Have a nice day!" I would only want to count only
the letter "a." *Is there some sort of IF-LEN-combo function? *Help.



RagDyeR

Counting specific letters in a cell
 
Try this:

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"A",""))


--

HTH,

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

"Sandy" wrote in message
...
How do I count the number of specific letters in a given cell? For example
if a cell has the words "Have a nice day!" I would only want to count only
the letter "a." Is there some sort of IF-LEN-combo function? Help.



RagDyeR

Counting specific letters in a cell
 
This works for:
"Have a nice day!"

As well as:
"A nice day was had by all!"
--

Regards,

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

"RagDyeR" wrote in message
...
Try this:

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"A",""))


--

HTH,

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

"Sandy" wrote in message
...
How do I count the number of specific letters in a given cell? For example
if a cell has the words "Have a nice day!" I would only want to count only
the letter "a." Is there some sort of IF-LEN-combo function? Help.





All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com