ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count occurences of a letter in a cell (https://www.excelbanter.com/excel-worksheet-functions/215804-count-occurences-letter-cell.html)

Jair Batista

Count occurences of a letter in a cell
 
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!


Glenn

Count occurences of a letter in a cell
 
Jair Batista wrote:
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(B 1),""))

Jair Batista

Count occurences of a letter in a cell
 

"Glenn" wrote:

Jair Batista wrote:
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(B 1),""))



Thank you Glenn! It worked well!
Jair





All times are GMT +1. The time now is 11:38 PM.

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