Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Double Countif

Hi all. I need to do a 2 level countif. Given the following 3 column
example:

A 1 0
B 0 0
A 1 0
C 1 1
D 0 1
A 0 0
X 0 0

I need a formula at the bottom of each column that will count the number of
entries that are BOTH greater than zero AND have A in the forst column. So
the first numerical column result would be 2, the second would be 0.
Possible?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Double Countif

One way:

B8: =SUMPRODUCT(--($A1:$A7="A"),--(B1:B70))
C8: =SUMPRODUCT(--($A1:$A7="A"),--(C1:C70))

If B and C can only have values of 0 or 1, this simplifies to

B8: =SUMIF($A1:$A7,"A",B1:B7)
C8: =SUMIF($A1:$A7,"A",C1:C7)





In article ,
"Steph" wrote:

Hi all. I need to do a 2 level countif. Given the following 3 column
example:

A 1 0
B 0 0
A 1 0
C 1 1
D 0 1
A 0 0
X 0 0

I need a formula at the bottom of each column that will count the number of
entries that are BOTH greater than zero AND have A in the forst column. So
the first numerical column result would be 2, the second would be 0.
Possible?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Double Countif

Wow, fantastic! Can I ask you to explain how that works? The -- really has
me baffled!

"JE McGimpsey" wrote in message
...
One way:

B8: =SUMPRODUCT(--($A1:$A7="A"),--(B1:B70))
C8: =SUMPRODUCT(--($A1:$A7="A"),--(C1:C70))

If B and C can only have values of 0 or 1, this simplifies to

B8: =SUMIF($A1:$A7,"A",B1:B7)
C8: =SUMIF($A1:$A7,"A",C1:C7)





In article ,
"Steph" wrote:

Hi all. I need to do a 2 level countif. Given the following 3 column
example:

A 1 0
B 0 0
A 1 0
C 1 1
D 0 1
A 0 0
X 0 0

I need a formula at the bottom of each column that will count the number

of
entries that are BOTH greater than zero AND have A in the forst column.

So
the first numerical column result would be 2, the second would be 0.
Possible?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Double Countif

See

http://www.mcgimpsey.com/excel/doubleneg.html


In article ,
"Steph" wrote:

Wow, fantastic! Can I ask you to explain how that works? The -- really has
me baffled!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Double Countif

Thank you!!

"JE McGimpsey" wrote in message
...
See

http://www.mcgimpsey.com/excel/doubleneg.html


In article ,
"Steph" wrote:

Wow, fantastic! Can I ask you to explain how that works? The -- really

has
me baffled!



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
Double CountIF LiAD Excel Worksheet Functions 5 December 2nd 08 11:54 PM
double axis, double problem (i hope only to me) kitcho Charts and Charting in Excel 1 December 30th 06 12:52 AM
countif with double criteria Benoit Excel Discussion (Misc queries) 3 December 22nd 06 03:10 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
End Double Sub Zurn[_22_] Excel Programming 0 October 8th 04 12:27 PM


All times are GMT +1. The time now is 02:46 AM.

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"