ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNTIF Statement with Multiple Conditions in Different Ranges (https://www.excelbanter.com/excel-worksheet-functions/23666-countif-statement-multiple-conditions-different-ranges.html)

KJA

COUNTIF Statement with Multiple Conditions in Different Ranges
 
I'd like to count the number of values whe

Column A equals X
AND
Column B equals y

(for any given row)

Is this possible?


Hi
You'll need to use SUMPRODUCT() for this. eg:
=SUMPRODUCT((A2:A1000="X")*(B2:B1000="Y"))
You cannot use full column references eg A:A and the references you do use
must be the same size.

--
Andy.


"KJA" wrote in message
...
I'd like to count the number of values whe

Column A equals X
AND
Column B equals y

(for any given row)

Is this possible?




JulieD

and for details on how the SUMPRODUCT function works check out
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
<Andy B wrote in message ...
Hi
You'll need to use SUMPRODUCT() for this. eg:
=SUMPRODUCT((A2:A1000="X")*(B2:B1000="Y"))
You cannot use full column references eg A:A and the references you do use
must be the same size.

--
Andy.


"KJA" wrote in message
...
I'd like to count the number of values whe

Column A equals X
AND
Column B equals y

(for any given row)

Is this possible?







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

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