Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default 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.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count the number of times a name occurs in a column Gary Excel Worksheet Functions 2 December 28th 06 12:07 AM
How can I count the number of times a letter repeats in a string? Wiley Excel Worksheet Functions 3 May 11th 06 06:53 PM
I would like to count the # of times a value occurs in Col B base shopaholic Excel Worksheet Functions 3 December 9th 05 04:25 PM
How to count the number of times something occurs within a certain month Joyce Excel Worksheet Functions 2 October 18th 05 08:38 PM
How do I count the times a number occurs in a given criteria? w_aller Excel Discussion (Misc queries) 2 February 3rd 05 09:06 AM


All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"