ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I count number of cels the matches 2 conditions ? (https://www.excelbanter.com/excel-worksheet-functions/15267-how-do-i-count-number-cels-matches-2-conditions.html)

Abra

How do I count number of cels the matches 2 conditions ?
 
How do I count number of cels the matches 2 conditions (I am using COUNTIF
and AND) ??? I need the total of cels that matches the 2 conditions and not
the sum of the cels.
Thanks

Bob Phillips

=SUMPRODUCT(--(A1:A100="value1"),--(A1:A100="value2"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Abra" wrote in message
...
How do I count number of cels the matches 2 conditions (I am using COUNTIF
and AND) ??? I need the total of cels that matches the 2 conditions and

not
the sum of the cels.
Thanks




Ragdyer

You could use Countif() in conjunction with Sum() to count against any
number of conditions:

=SUM(COUNTIF(A1:A100,{"cond#1","cond#2","cond#3"}) )
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Abra" wrote in message
...
How do I count number of cels the matches 2 conditions (I am using COUNTIF
and AND) ??? I need the total of cels that matches the 2 conditions and

not
the sum of the cels.
Thanks




All times are GMT +1. The time now is 10:28 AM.

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