Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Counting cells that contain a substring

How do I count the number of cells in a range that contain the character
substring xxx?

I know =COUNTIF($G$8:$G$11,"kkkk") counts cells that are exactly kkkk, but i
want to count cells that congaing a substring.

I appreciate your help, -John
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default Counting cells that contain a substring

On Sun, 22 Feb 2009 03:07:01 -0800, John
wrote:

How do I count the number of cells in a range that contain the character
substring xxx?

I know =COUNTIF($G$8:$G$11,"kkkk") counts cells that are exactly kkkk, but i
want to count cells that congaing a substring.

I appreciate your help, -John


Try this formula:

=SUMPRODUCT(--NOT(ISERROR(FIND("kkkk",G8:G11))))

If you don't care about lower and upper case, you can try this:

=SUMPRODUCT(--NOT(ISERROR(SEARCH("kkkk",G8:G11))))

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Counting cells that contain a substring

Hi,

You are almost the

=COUNTIF($G$8:$G$11,"*xxx*")

* is the wildcard for anything so this says anything containing xxx.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"John" wrote:

How do I count the number of cells in a range that contain the character
substring xxx?

I know =COUNTIF($G$8:$G$11,"kkkk") counts cells that are exactly kkkk, but i
want to count cells that congaing a substring.

I appreciate your help, -John

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Counting cells that contain a substring

Put the substring in a cell:

A1 = kkkk

then:

=COUNTIF($G$8:$G$11,"*"&A1&"*")

--
Biff
Microsoft Excel MVP


"John" wrote in message
...
How do I count the number of cells in a range that contain the character
substring xxx?

I know =COUNTIF($G$8:$G$11,"kkkk") counts cells that are exactly kkkk, but
i
want to count cells that congaing a substring.

I appreciate your help, -John



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
Extracting a SubString Brian Excel Discussion (Misc queries) 4 June 28th 07 07:30 PM
Finding a Substring? Jakobshavn Isbrae Excel Worksheet Functions 4 February 22nd 07 03:26 PM
Substring Ldyflyr Excel Discussion (Misc queries) 0 February 15th 07 03:16 PM
Substring Petya Excel Discussion (Misc queries) 0 February 15th 07 02:53 PM
Counting occurences of a substring in a range of cells. Jeff Cantwell Excel Worksheet Functions 4 September 8th 05 10:45 PM


All times are GMT +1. The time now is 05:54 AM.

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"