ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countif? (https://www.excelbanter.com/excel-worksheet-functions/130519-countif.html)

DES

Countif?
 
Ok this should be trivial to do, but I am going blank today.

We got 425 questionnaires back from a survey we sent out.
I have 3 columns of True or false.

I want to be able to count a record if either column a OR column B is true
AND column C is true

I know this should be easy but just cannot get it to work.


TIA
--
Darrell
Play every game as if it were your last....
Someday you will be right.





Ron Coderre

Countif?
 
With
A2:C500 containing True/False values

This formula returns the count of rows where
either Col_A or Col_B is TRUE
AND where Col_C is TRUE

=SUMPRODUCT(((A2:A500+B2:B500)0)*C2:C500)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"DES" wrote:

Ok this should be trivial to do, but I am going blank today.

We got 425 questionnaires back from a survey we sent out.
I have 3 columns of True or false.

I want to be able to count a record if either column a OR column B is true
AND column C is true

I know this should be easy but just cannot get it to work.


TIA
--
Darrell
Play every game as if it were your last....
Someday you will be right.






Bernard Liengme

Countif?
 
I had trouble with: "I want to be able to count a record if either column a
OR column B is true AND column C is true"

This counts one column =COUNTIF(A1:A7,TRUE)
This counts is BOTH A and B are TRUE =SUMPRODUCT((A1:A7=TRUE)*(B1:B7=TRUE))
This counts is EITHER A or B is TRUE
=SUMPRODUCT(--(((A1:A7=TRUE)+(B1:B7=TRUE))0))
This counts if any 2 of three is TRUE
=SUMPRODUCT(--(((A1:A7=TRUE)+(B1:B7=TRUE)+(C1:C7=TRUE))1))
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"DES" wrote in message
...
Ok this should be trivial to do, but I am going blank today.

We got 425 questionnaires back from a survey we sent out.
I have 3 columns of True or false.

I want to be able to count a record if either column a OR column B is true
AND column C is true

I know this should be easy but just cannot get it to work.


TIA
--
Darrell
Play every game as if it were your last....
Someday you will be right.







DES

Countif?
 
Thanks, works perfectly. I forgot that true=1 and false = 0

Obviously I am just a casual user.


"Ron Coderre" wrote in message
...
With
A2:C500 containing True/False values

This formula returns the count of rows where
either Col_A or Col_B is TRUE
AND where Col_C is TRUE

=SUMPRODUCT(((A2:A500+B2:B500)0)*C2:C500)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"DES" wrote:

Ok this should be trivial to do, but I am going blank today.

We got 425 questionnaires back from a survey we sent out.
I have 3 columns of True or false.

I want to be able to count a record if either column a OR column B is
true
AND column C is true

I know this should be easy but just cannot get it to work.


TIA
--
Darrell
Play every game as if it were your last....
Someday you will be right.








DES

Countif?
 
Thanks you , Not quite what I was looking for, but Ron got it for me.

In order for a record to be counted, Column C MUST be true AND either
Column A OR Column B (or both) must be true.


"Bernard Liengme" wrote in message
...
I had trouble with: "I want to be able to count a record if either column a
OR column B is true AND column C is true"

This counts one column =COUNTIF(A1:A7,TRUE)
This counts is BOTH A and B are TRUE
=SUMPRODUCT((A1:A7=TRUE)*(B1:B7=TRUE))
This counts is EITHER A or B is TRUE
=SUMPRODUCT(--(((A1:A7=TRUE)+(B1:B7=TRUE))0))
This counts if any 2 of three is TRUE
=SUMPRODUCT(--(((A1:A7=TRUE)+(B1:B7=TRUE)+(C1:C7=TRUE))1))
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"DES" wrote in message
...
Ok this should be trivial to do, but I am going blank today.

We got 425 questionnaires back from a survey we sent out.
I have 3 columns of True or false.

I want to be able to count a record if either column a OR column B is
true AND column C is true

I know this should be easy but just cannot get it to work.


TIA
--
Darrell
Play every game as if it were your last....
Someday you will be right.










All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com