Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Tricky Conditional Count

I need to do a conditional count (how many rows are there where the following
conditions are both true). One condition is, does a cell that contains
multiple text strings (DEF5678, GHI6789, ABC1234) contain the text string
ABC1234? If that condition is true, is the second condition also true? Tell
me how many records there are where both conditions are true.

I'm very familiar with array formulas
{=sum((array1=ABC1234)*(array2=test2))}, and I'm familiar with searching for
text strings (=countif(B2:B100,"*"ABC1234"*").

Any thoughts?

Steve




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default Tricky Conditional Count

Try this

=SUMPRODUCT(--(ISNUMBER(SEARCH("ABC1234",A10:A12))),--(B10:B12="test"))

"Steve" wrote:

I need to do a conditional count (how many rows are there where the following
conditions are both true). One condition is, does a cell that contains
multiple text strings (DEF5678, GHI6789, ABC1234) contain the text string
ABC1234? If that condition is true, is the second condition also true? Tell
me how many records there are where both conditions are true.

I'm very familiar with array formulas
{=sum((array1=ABC1234)*(array2=test2))}, and I'm familiar with searching for
text strings (=countif(B2:B100,"*"ABC1234"*").

Any thoughts?

Steve




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Tricky Conditional Count

Barb -

That did it, thanks. Teach me what the double -- does for the formula,
please.

I appreciate the assistance.

Steve





"Barb Reinhardt" wrote:

Try this

=SUMPRODUCT(--(ISNUMBER(SEARCH("ABC1234",A10:A12))),--(B10:B12="test"))

"Steve" wrote:

I need to do a conditional count (how many rows are there where the following
conditions are both true). One condition is, does a cell that contains
multiple text strings (DEF5678, GHI6789, ABC1234) contain the text string
ABC1234? If that condition is true, is the second condition also true? Tell
me how many records there are where both conditions are true.

I'm very familiar with array formulas
{=sum((array1=ABC1234)*(array2=test2))}, and I'm familiar with searching for
text strings (=countif(B2:B100,"*"ABC1234"*").

Any thoughts?

Steve




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Tricky Conditional Count

The "double unary minus" changes a boolean (false or true) to a number 0 or
1 so that you can multiply.
--
David Biddulph

"Steve" wrote in message
...
Barb -

That did it, thanks. Teach me what the double -- does for the formula,
please.


"Barb Reinhardt" wrote:

Try this

=SUMPRODUCT(--(ISNUMBER(SEARCH("ABC1234",A10:A12))),--(B10:B12="test"))

"Steve" wrote:

I need to do a conditional count (how many rows are there where the
following
conditions are both true). One condition is, does a cell that contains
multiple text strings (DEF5678, GHI6789, ABC1234) contain the text
string
ABC1234? If that condition is true, is the second condition also true?
Tell
me how many records there are where both conditions are true.

I'm very familiar with array formulas
{=sum((array1=ABC1234)*(array2=test2))}, and I'm familiar with
searching for
text strings (=countif(B2:B100,"*"ABC1234"*").

Any thoughts?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Tricky Conditional Count

See http://www.xldynamic.com/source/xld.SUMPRODUCT.html for a detailed
explanation.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Steve" wrote in message
...
Barb -

That did it, thanks. Teach me what the double -- does for the formula,
please.

I appreciate the assistance.

Steve





"Barb Reinhardt" wrote:

Try this

=SUMPRODUCT(--(ISNUMBER(SEARCH("ABC1234",A10:A12))),--(B10:B12="test"))

"Steve" wrote:

I need to do a conditional count (how many rows are there where the
following
conditions are both true). One condition is, does a cell that contains
multiple text strings (DEF5678, GHI6789, ABC1234) contain the text
string
ABC1234? If that condition is true, is the second condition also true?
Tell
me how many records there are where both conditions are true.

I'm very familiar with array formulas
{=sum((array1=ABC1234)*(array2=test2))}, and I'm familiar with
searching for
text strings (=countif(B2:B100,"*"ABC1234"*").

Any thoughts?

Steve








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Tricky Conditional Count

You can use a single "-" no quotes, if you have even criterias, like 2, 4 , 6
and so on...

=SUMPRODUCT(-(ISNUMBER(SEARCH("ABC1234",A10:A12))),-(B10:B12="test"))


"Steve" wrote:

Barb -

That did it, thanks. Teach me what the double -- does for the formula,
please.

I appreciate the assistance.

Steve





"Barb Reinhardt" wrote:

Try this

=SUMPRODUCT(--(ISNUMBER(SEARCH("ABC1234",A10:A12))),--(B10:B12="test"))

"Steve" wrote:

I need to do a conditional count (how many rows are there where the following
conditions are both true). One condition is, does a cell that contains
multiple text strings (DEF5678, GHI6789, ABC1234) contain the text string
ABC1234? If that condition is true, is the second condition also true? Tell
me how many records there are where both conditions are true.

I'm very familiar with array formulas
{=sum((array1=ABC1234)*(array2=test2))}, and I'm familiar with searching for
text strings (=countif(B2:B100,"*"ABC1234"*").

Any thoughts?

Steve




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
Please help me with a Conditional Count... SisterDell Excel Discussion (Misc queries) 4 March 22nd 07 05:03 PM
Help with tricky IF statement. Somewhat conditional. mcr1 Excel Discussion (Misc queries) 7 January 9th 06 01:11 PM
Conditional Count Ralph Excel Worksheet Functions 2 December 1st 05 06:27 PM
conditional count Karen Excel Worksheet Functions 1 August 11th 05 11:53 PM
tricky conditional formatting albritton_99 Excel Worksheet Functions 2 November 9th 04 01:42 PM


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