Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jennifer
 
Posts: n/a
Default Contains instead of Equal

Is there a function that counts a cell if it contains a value rather than
equals that value?

For example, I'd like to count the number of cells that contain the word
"dog".

First cell is (dog, cat, bird)
Second cell is (dog)
Third cell is (cat, bird)
Forth cell is (dog, cat)

The formula would then return a value of 3, because the word "dog" shows up
in three cells.

Is this possible? If so, does anyone have any suggestions? Thanks in
advance.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUMPRODUCT(--(ISNUMBER(FIND("cat",G2:G100))))

if case-sensitive

=SUMPRODUCT(--(ISNUMBER(SEARCH("cat",G2:G100))))

if not

--
HTH

Bob Phillips

"Jennifer" wrote in message
...
Is there a function that counts a cell if it contains a value rather than
equals that value?

For example, I'd like to count the number of cells that contain the word
"dog".

First cell is (dog, cat, bird)
Second cell is (dog)
Third cell is (cat, bird)
Forth cell is (dog, cat)

The formula would then return a value of 3, because the word "dog" shows

up
in three cells.

Is this possible? If so, does anyone have any suggestions? Thanks in
advance.



  #3   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=COUNTIF(A1:A100,"*dog*")

or

=COUNTIF(A:A,"*dog*")

or

=COUNTIF(A1:A100,"*"&B1&"*")

....where B1 contains your criterion, such as 'dog'.

Hope this helps!

In article ,
"Jennifer" wrote:

Is there a function that counts a cell if it contains a value rather than
equals that value?

For example, I'd like to count the number of cells that contain the word
"dog".

First cell is (dog, cat, bird)
Second cell is (dog)
Third cell is (cat, bird)
Forth cell is (dog, cat)

The formula would then return a value of 3, because the word "dog" shows up
in three cells.

Is this possible? If so, does anyone have any suggestions? Thanks in
advance.

  #4   Report Post  
bj
 
Posts: n/a
Default

try
=sum(if(iserror(find("dog",{range})),0,1))
entered as an array equation (control-Shift-Enter

"Jennifer" wrote:

Is there a function that counts a cell if it contains a value rather than
equals that value?

For example, I'd like to count the number of cells that contain the word
"dog".

First cell is (dog, cat, bird)
Second cell is (dog)
Third cell is (cat, bird)
Forth cell is (dog, cat)

The formula would then return a value of 3, because the word "dog" shows up
in three cells.

Is this possible? If so, does anyone have any suggestions? Thanks in
advance.

  #5   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi Jennifer

One way
{=SUM(--ISNUMBER(FIND("dog",A1:C20)))}

Note this is an array formula so commit with Ctrl+Shift+Enter not just Enter
either when entering or amending.
Do not type the curly braces { } , Excel will enter these for you.
Change range to suit.

Regards

Roger Govier


Jennifer wrote:
Is there a function that counts a cell if it contains a value rather than
equals that value?

For example, I'd like to count the number of cells that contain the word
"dog".

First cell is (dog, cat, bird)
Second cell is (dog)
Third cell is (cat, bird)
Forth cell is (dog, cat)

The formula would then return a value of 3, because the word "dog" shows up
in three cells.

Is this possible? If so, does anyone have any suggestions? Thanks in
advance.

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
Formula which is greater tahn or equal to zero bruce2444 Excel Worksheet Functions 2 September 7th 05 12:24 PM
COUNT IF NOT EQUAL TO ZERO ellebelle Excel Worksheet Functions 12 June 24th 05 04:08 PM
ANOVA procedures and t-test equal variance Noosa Excel Discussion (Misc queries) 1 May 12th 05 06:09 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
How to verify that 3 cells are equal Scott Excel Worksheet Functions 1 November 9th 04 10:24 PM


All times are GMT +1. The time now is 05:11 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"