ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I count the number of times a letter repeats in a string? (https://www.excelbanter.com/excel-worksheet-functions/88151-how-can-i-count-number-times-letter-repeats-string.html)

Wiley

How can I count the number of times a letter repeats in a string?
 


SteveG

How can I count the number of times a letter repeats in a string?
 

Wiley,

If your string is in A1 and you are trying to count the occurences of
the letter "a" then:

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

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=541202


SteveG

How can I count the number of times a letter repeats in a string?
 

Wiley,

If your string is in A1 and you are trying to count the occurences of
the letter "a" then:

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

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=541202


Bob Phillips

How can I count the number of times a letter repeats in a string?
 
See other post.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Wiley" wrote in message
...





All times are GMT +1. The time now is 07:29 AM.

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