ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do i countif on multiple criterea? (https://www.excelbanter.com/excel-worksheet-functions/106685-how-do-i-countif-multiple-criterea.html)

Dan Shoemaker

how do i countif on multiple criterea?
 
I would like to know how to count if 2 criterea are true in a range of cells

Bob Phillips

how do i countif on multiple criterea?
 
=SUMPRODUCT(--(rng1="text"),--(rng2=number))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dan Shoemaker" wrote in message
...
I would like to know how to count if 2 criterea are true in a range of

cells



Dan Shoemaker

how do i countif on multiple criterea?
 
TY

"Bob Phillips" wrote:

=SUMPRODUCT(--(rng1="text"),--(rng2=number))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dan Shoemaker" wrote in message
...
I would like to know how to count if 2 criterea are true in a range of

cells




Jman

how do i countif on multiple criterea?
 


"Dan Shoemaker" wrote:

TY

"Bob Phillips" wrote:

=SUMPRODUCT(--(rng1="text"),--(rng2=number))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dan Shoemaker" wrote in message
...
I would like to know how to count if 2 criterea are true in a range of

cells


I was wondering if 3 or more critereas are true in a range of cells... how can i get them to count value of 1... instead of 3


Roger Govier

how do i countif on multiple criterea?
 
Hi

Continuing with what Bob told you, you can add as many criteria as you
wish
=SUMPRODUCT(--(rng1="text"),--(rng2=number),--(rng3=number),--(rng4="text"))

Each test will return True or False.
The double unary minus will coerce True's to 1's and False's to 0's.
Multiplying them together, it is only all 1's that will return a value
of 1, any 0 will make the whole sum 0.
So Sumproduct is adding only the values where all tests are true, and
therefore giving your Count.

--
Regards

Roger Govier


"Jman" wrote in message
...


"Dan Shoemaker" wrote:

TY

"Bob Phillips" wrote:

=SUMPRODUCT(--(rng1="text"),--(rng2=number))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dan Shoemaker" wrote in
message
...
I would like to know how to count if 2 criterea are true in a
range of
cells


I was wondering if 3 or more critereas are true in a range of
cells... how can i get them to count value of 1... instead of 3





All times are GMT +1. The time now is 08:44 AM.

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