Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I count the number of cells that meet multiple criteria?

I want to count cells from 3 worksheets that meet multiple criteria.

I've tried with a result of 0 (it should be 3):

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10)*(Craig!X9:X258=In fo!B15)*(Craig!F9:F258=Craig!Y9)*(Craig!F9:F258=Cr aig!Y10)*(Dan!X9:X258=Info!B15)*(Dan!F9:F258=Dan!Y 9)*(Dan!F9:F258=Dan!Y10)

I've also tried with a result of 0:

=SUMPRODUCT(--(Mark!X9:X258=Info!B15),--(Mark!F9:F258=Mark!Y9),--(Mark!F9:F258=Mark!Y10),--(Craig!X9:X258=Info!B15),--(Craig!F9:F258=Craig!Y9),--(Craig!F9:F258=Craig!Y10),--(Dan!X9:X258=Info!B15),--(Dan!F9:F258=Dan!Y9),--(Dan!F9:F258=Dan!Y10)

Please help!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default How do I count the number of cells that meet multiple criteria?

Hi,

First you are missing a parenthesis at the end. Second this would only
return a value if All conditions were true on the same row at the same time,
is that what you are checking?

So for example if Mark!X9:X258=Info!B15 is true for row 9 but
Mark!F9:F258=Mark!Y9 is true for row 10 then 0 will be your answer.

If this helps, please click the Yes button

Cheers,
Shane DEvenshire

"Dianna_P" wrote:

I want to count cells from 3 worksheets that meet multiple criteria.

I've tried with a result of 0 (it should be 3):

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10)*(Craig!X9:X258=In fo!B15)*(Craig!F9:F258=Craig!Y9)*(Craig!F9:F258=Cr aig!Y10)*(Dan!X9:X258=Info!B15)*(Dan!F9:F258=Dan!Y 9)*(Dan!F9:F258=Dan!Y10)

I've also tried with a result of 0:

=SUMPRODUCT(--(Mark!X9:X258=Info!B15),--(Mark!F9:F258=Mark!Y9),--(Mark!F9:F258=Mark!Y10),--(Craig!X9:X258=Info!B15),--(Craig!F9:F258=Craig!Y9),--(Craig!F9:F258=Craig!Y10),--(Dan!X9:X258=Info!B15),--(Dan!F9:F258=Dan!Y9),--(Dan!F9:F258=Dan!Y10)

Please help!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default How do I count the number of cells that meet multiple criteria?

The syntax looks find, so the problem must be with the data.
I would test each part separately to find where the error is.
for example does this =SUMPRODUCT((Mark!X9:X258=Info!B15)*1) give you the
correct answer?
Next does this
=SUMPRODUCT((Mark!F9:F258=Mark!Y9)*1)
and this
=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9))
Are you working with number, dates or text?
and so on
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Dianna_P" wrote in message
...
I want to count cells from 3 worksheets that meet multiple criteria.

I've tried with a result of 0 (it should be 3):

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10)*(Craig!X9:X258=In fo!B15)*(Craig!F9:F258=Craig!Y9)*(Craig!F9:F258=Cr aig!Y10)*(Dan!X9:X258=Info!B15)*(Dan!F9:F258=Dan!Y 9)*(Dan!F9:F258=Dan!Y10)

I've also tried with a result of 0:

=SUMPRODUCT(--(Mark!X9:X258=Info!B15),--(Mark!F9:F258=Mark!Y9),--(Mark!F9:F258=Mark!Y10),--(Craig!X9:X258=Info!B15),--(Craig!F9:F258=Craig!Y9),--(Craig!F9:F258=Craig!Y10),--(Dan!X9:X258=Info!B15),--(Dan!F9:F258=Dan!Y9),--(Dan!F9:F258=Dan!Y10)

Please help!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default How do I count the number of cells that meet multiple criteria?

Hi,

One other thing you might consider - if the entries are numeric or dates are
some of them text and other numeric? The data types must be the same in your
formula.

Cheers,
Shane Devenshire

"Dianna_P" wrote:

I want to count cells from 3 worksheets that meet multiple criteria.

I've tried with a result of 0 (it should be 3):

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10)*(Craig!X9:X258=In fo!B15)*(Craig!F9:F258=Craig!Y9)*(Craig!F9:F258=Cr aig!Y10)*(Dan!X9:X258=Info!B15)*(Dan!F9:F258=Dan!Y 9)*(Dan!F9:F258=Dan!Y10)

I've also tried with a result of 0:

=SUMPRODUCT(--(Mark!X9:X258=Info!B15),--(Mark!F9:F258=Mark!Y9),--(Mark!F9:F258=Mark!Y10),--(Craig!X9:X258=Info!B15),--(Craig!F9:F258=Craig!Y9),--(Craig!F9:F258=Craig!Y10),--(Dan!X9:X258=Info!B15),--(Dan!F9:F258=Dan!Y9),--(Dan!F9:F258=Dan!Y10)

Please help!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default How do I count the number of cells that meet multiple criteria?

Are you sure that it shouldn't be separate functions

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10))
+SUMPRODUCT(Craig!X9:X258=Info!B15)*(Craig!F9:F258 =Craig!Y9)*(Craig!F9:F258=Craig!Y10))
+SUMPRODUCT(Dan!X9:X258=Info!B15)*(Dan!F9:F258=Dan !Y9)*(Dan!F9:F258=Dan!Y10))

--
__________________________________
HTH

Bob

"Dianna_P" wrote in message
...
I want to count cells from 3 worksheets that meet multiple criteria.

I've tried with a result of 0 (it should be 3):

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10)*(Craig!X9:X258=In fo!B15)*(Craig!F9:F258=Craig!Y9)*(Craig!F9:F258=Cr aig!Y10)*(Dan!X9:X258=Info!B15)*(Dan!F9:F258=Dan!Y 9)*(Dan!F9:F258=Dan!Y10)

I've also tried with a result of 0:

=SUMPRODUCT(--(Mark!X9:X258=Info!B15),--(Mark!F9:F258=Mark!Y9),--(Mark!F9:F258=Mark!Y10),--(Craig!X9:X258=Info!B15),--(Craig!F9:F258=Craig!Y9),--(Craig!F9:F258=Craig!Y10),--(Dan!X9:X258=Info!B15),--(Dan!F9:F258=Dan!Y9),--(Dan!F9:F258=Dan!Y10)

Please help!





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How do I count the number of cells that meet multiple criteria

I am working with text.
I tried each part separately and I got correct answers.
Then I started combining parts and I got correct answers:

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9))
and =SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y10))

However, when I combine everything, I get 0 and it should be 3:

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10))

I guess I could just add the separate sections and get the same result.
Add the cell with the formula
=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)) to the cell with
formula =SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y10)).

I just thought it could be combined.



"Bernard Liengme" wrote:

The syntax looks find, so the problem must be with the data.
I would test each part separately to find where the error is.
for example does this =SUMPRODUCT((Mark!X9:X258=Info!B15)*1) give you the
correct answer?
Next does this
=SUMPRODUCT((Mark!F9:F258=Mark!Y9)*1)
and this
=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9))
Are you working with number, dates or text?
and so on
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Dianna_P" wrote in message
...
I want to count cells from 3 worksheets that meet multiple criteria.

I've tried with a result of 0 (it should be 3):

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10)*(Craig!X9:X258=In fo!B15)*(Craig!F9:F258=Craig!Y9)*(Craig!F9:F258=Cr aig!Y10)*(Dan!X9:X258=Info!B15)*(Dan!F9:F258=Dan!Y 9)*(Dan!F9:F258=Dan!Y10)

I've also tried with a result of 0:

=SUMPRODUCT(--(Mark!X9:X258=Info!B15),--(Mark!F9:F258=Mark!Y9),--(Mark!F9:F258=Mark!Y10),--(Craig!X9:X258=Info!B15),--(Craig!F9:F258=Craig!Y9),--(Craig!F9:F258=Craig!Y10),--(Dan!X9:X258=Info!B15),--(Dan!F9:F258=Dan!Y9),--(Dan!F9:F258=Dan!Y10)

Please help!




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How do I count the number of cells that meet multiple criteria

I tried and it didn't work. I also tried an additional paranthesis after the
2nd and 3rd SUMPRODUCT.

"Bob Phillips" wrote:

Are you sure that it shouldn't be separate functions

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10))
+SUMPRODUCT(Craig!X9:X258=Info!B15)*(Craig!F9:F258 =Craig!Y9)*(Craig!F9:F258=Craig!Y10))
+SUMPRODUCT(Dan!X9:X258=Info!B15)*(Dan!F9:F258=Dan !Y9)*(Dan!F9:F258=Dan!Y10))

--
__________________________________
HTH

Bob

"Dianna_P" wrote in message
...
I want to count cells from 3 worksheets that meet multiple criteria.

I've tried with a result of 0 (it should be 3):

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10)*(Craig!X9:X258=In fo!B15)*(Craig!F9:F258=Craig!Y9)*(Craig!F9:F258=Cr aig!Y10)*(Dan!X9:X258=Info!B15)*(Dan!F9:F258=Dan!Y 9)*(Dan!F9:F258=Dan!Y10)

I've also tried with a result of 0:

=SUMPRODUCT(--(Mark!X9:X258=Info!B15),--(Mark!F9:F258=Mark!Y9),--(Mark!F9:F258=Mark!Y10),--(Craig!X9:X258=Info!B15),--(Craig!F9:F258=Craig!Y9),--(Craig!F9:F258=Craig!Y10),--(Dan!X9:X258=Info!B15),--(Dan!F9:F258=Dan!Y9),--(Dan!F9:F258=Dan!Y10)

Please help!




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How do I count the number of cells that meet multiple criteria

Thought further and came up with the following with the correct answer:

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9))+SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark !F9:F258=Mark!Y10))

Thank you for all the help!

"Dianna_P" wrote:

I am working with text.
I tried each part separately and I got correct answers.
Then I started combining parts and I got correct answers:

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9))
and =SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y10))

However, when I combine everything, I get 0 and it should be 3:

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10))

I guess I could just add the separate sections and get the same result.
Add the cell with the formula
=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)) to the cell with
formula =SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y10)).

I just thought it could be combined.



"Bernard Liengme" wrote:

The syntax looks find, so the problem must be with the data.
I would test each part separately to find where the error is.
for example does this =SUMPRODUCT((Mark!X9:X258=Info!B15)*1) give you the
correct answer?
Next does this
=SUMPRODUCT((Mark!F9:F258=Mark!Y9)*1)
and this
=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9))
Are you working with number, dates or text?
and so on
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Dianna_P" wrote in message
...
I want to count cells from 3 worksheets that meet multiple criteria.

I've tried with a result of 0 (it should be 3):

=SUMPRODUCT((Mark!X9:X258=Info!B15)*(Mark!F9:F258= Mark!Y9)*(Mark!F9:F258=Mark!Y10)*(Craig!X9:X258=In fo!B15)*(Craig!F9:F258=Craig!Y9)*(Craig!F9:F258=Cr aig!Y10)*(Dan!X9:X258=Info!B15)*(Dan!F9:F258=Dan!Y 9)*(Dan!F9:F258=Dan!Y10)

I've also tried with a result of 0:

=SUMPRODUCT(--(Mark!X9:X258=Info!B15),--(Mark!F9:F258=Mark!Y9),--(Mark!F9:F258=Mark!Y10),--(Craig!X9:X258=Info!B15),--(Craig!F9:F258=Craig!Y9),--(Craig!F9:F258=Craig!Y10),--(Dan!X9:X258=Info!B15),--(Dan!F9:F258=Dan!Y9),--(Dan!F9:F258=Dan!Y10)

Please 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 cells that meet 2 criteria aimee Excel Worksheet Functions 3 June 18th 08 06:45 PM
Count the number of values in a list that meet certain criteria Fudgy Excel Worksheet Functions 1 May 5th 08 09:23 PM
Count Cells that meet Criteria kmason Excel Worksheet Functions 6 August 24th 06 04:31 PM
count non blank cells which meet criteria in another column cmarsh5035 Excel Worksheet Functions 2 February 16th 05 04:32 PM
How can I count cells that meet two criteria within a filtered co. lizzzy Excel Worksheet Functions 1 January 21st 05 06:03 PM


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