Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Counting specific letters in multiple cells

Hi,
Lets say I want to look for the letter "O" in a cell with the text "How are
you?" and count the number of "O" in that particular cell, the formula would
be something like:
=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"O",""))

and the result for "How are you?" will return 2.

My question is, what if I want to do it for multiple cells? For instance,
from Cell A1 to A10. Thanks in advance.
--
Shawn Toh (tohlz)
Microsoft MVP PowerPoint

(Amazing PowerPoint animations, artworks, games here)
http://pptheaven.mvps.org
PowerPoint Heaven - The Power to Animate
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,489
Default Counting specific letters in multiple cells

Hi,

you could use an array formula. Use CTRL+SHIFT+ENTER to commit the formula
rather than the usual ENTER.

=SUM(LEN(A1:A10)-LEN(SUBSTITUTE(UPPER(A1:A10),"O","")))

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"tohlz" <pptheaven[AT]gmail[DOT]com wrote in message
...
Hi,
Lets say I want to look for the letter "O" in a cell with the text "How
are
you?" and count the number of "O" in that particular cell, the formula
would
be something like:
=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"O",""))

and the result for "How are you?" will return 2.

My question is, what if I want to do it for multiple cells? For instance,
from Cell A1 to A10. Thanks in advance.
--
Shawn Toh (tohlz)
Microsoft MVP PowerPoint

(Amazing PowerPoint animations, artworks, games here)
http://pptheaven.mvps.org
PowerPoint Heaven - The Power to Animate


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Counting specific letters in multiple cells

Try

=SUMPRODUCT(LEN(A1:A10)-LEN(SUBSTITUTE(UPPER(A1:A10),"O","")))

Mike

"tohlz" wrote:

Hi,
Lets say I want to look for the letter "O" in a cell with the text "How are
you?" and count the number of "O" in that particular cell, the formula would
be something like:
=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"O",""))

and the result for "How are you?" will return 2.

My question is, what if I want to do it for multiple cells? For instance,
from Cell A1 to A10. Thanks in advance.
--
Shawn Toh (tohlz)
Microsoft MVP PowerPoint

(Amazing PowerPoint animations, artworks, games here)
http://pptheaven.mvps.org
PowerPoint Heaven - The Power to Animate

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Counting specific letters in multiple cells

Thanks for the help, Andy and Mike.
--
Shawn Toh (tohlz)
Microsoft MVP PowerPoint

(Amazing PowerPoint animations, artworks, games here)
http://pptheaven.mvps.org
PowerPoint Heaven - The Power to Animate


"Mike H" wrote:

Try

=SUMPRODUCT(LEN(A1:A10)-LEN(SUBSTITUTE(UPPER(A1:A10),"O","")))

Mike

"tohlz" wrote:

Hi,
Lets say I want to look for the letter "O" in a cell with the text "How are
you?" and count the number of "O" in that particular cell, the formula would
be something like:
=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"O",""))

and the result for "How are you?" will return 2.

My question is, what if I want to do it for multiple cells? For instance,
from Cell A1 to A10. Thanks in advance.
--
Shawn Toh (tohlz)
Microsoft MVP PowerPoint

(Amazing PowerPoint animations, artworks, games here)
http://pptheaven.mvps.org
PowerPoint Heaven - The Power to Animate

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Counting specific letters in multiple cells

Glad I could help and thanks for the feedback.

"tohlz" wrote:

Thanks for the help, Andy and Mike.
--
Shawn Toh (tohlz)
Microsoft MVP PowerPoint

(Amazing PowerPoint animations, artworks, games here)
http://pptheaven.mvps.org
PowerPoint Heaven - The Power to Animate


"Mike H" wrote:

Try

=SUMPRODUCT(LEN(A1:A10)-LEN(SUBSTITUTE(UPPER(A1:A10),"O","")))

Mike

"tohlz" wrote:

Hi,
Lets say I want to look for the letter "O" in a cell with the text "How are
you?" and count the number of "O" in that particular cell, the formula would
be something like:
=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"O",""))

and the result for "How are you?" will return 2.

My question is, what if I want to do it for multiple cells? For instance,
from Cell A1 to A10. Thanks in advance.
--
Shawn Toh (tohlz)
Microsoft MVP PowerPoint

(Amazing PowerPoint animations, artworks, games here)
http://pptheaven.mvps.org
PowerPoint Heaven - The Power to Animate

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
Counting specific letters in a cell Sandy Excel Worksheet Functions 3 July 3rd 08 04:58 PM
How to count specific letters in range of cells? Renee R.[_2_] Excel Discussion (Misc queries) 3 June 22nd 07 08:14 PM
Counting Specific Number of Days across Multiple Months [email protected] Links and Linking in Excel 1 April 14th 07 12:29 PM
Counting text across multiple sheets with a specific criterion Gitel Excel Worksheet Functions 4 November 13th 05 02:19 PM
Counting multiple occurances of a specific string BaseballFan Excel Worksheet Functions 1 February 26th 05 08:34 PM


All times are GMT +1. The time now is 02:36 PM.

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

About Us

"It's about Microsoft Excel"