![]() |
count no of times a letter occurs in a text string
I would like to count the no of times a specific letter occurs in a text
string. For eg if "My name is Amit" is in cell A1. I want to count the no of times "m" occurs in A1, which is '3'. Plz help. |
count no of times a letter occurs in a text string
=LEN(A1)-LEN(SUBSTITUTE(A1,"m",""))
-- Gary''s Student - gsnu200764 "nishad" wrote: I would like to count the no of times a specific letter occurs in a text string. For eg if "My name is Amit" is in cell A1. I want to count the no of times "m" occurs in A1, which is '3'. Plz help. |
count no of times a letter occurs in a text string
Try:
=LEN(C6)-LEN(SUBSTITUTE(UPPER(C6),"M","")) -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "nishad" wrote in message ... I would like to count the no of times a specific letter occurs in a text string. For eg if "My name is Amit" is in cell A1. I want to count the no of times "m" occurs in A1, which is '3'. Plz help. |
count no of times a letter occurs in a text string
=LEN(A1)-LEN(SUBSTITUTE(LOWER(A1),"m",""))
-- David Biddulph "nishad" wrote in message ... I would like to count the no of times a specific letter occurs in a text string. For eg if "My name is Amit" is in cell A1. I want to count the no of times "m" occurs in A1, which is '3'. Plz help. |
count no of times a letter occurs in a text string
Gives the answer 2 (not the 3 which the OP wanted) because SUBSTITUTE is
case-sensitive. You need a LOWER. -- David Biddulph "Gary''s Student" wrote in message ... =LEN(A1)-LEN(SUBSTITUTE(A1,"m","")) -- Gary''s Student - gsnu200764 "nishad" wrote: I would like to count the no of times a specific letter occurs in a text string. For eg if "My name is Amit" is in cell A1. I want to count the no of times "m" occurs in A1, which is '3'. Plz help. |
All times are GMT +1. The time now is 03:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com