ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count with 2 conditions? (https://www.excelbanter.com/excel-worksheet-functions/18364-count-2-conditions.html)

Lee

Count with 2 conditions?
 
My data is in the following format

A B
1 2
1 0
2 0

I want to count how often there is a "1" in column A and a corresponding 2
(in the same row) in colum B

Thanks

Gary Brown

In Column C put a formula concantenating Col A and B... = A1 & B1
Copy this down your list
In D1 put the formula...
=COUNTIF(C:C,"12")

HTH,
Gary Brown


"Lee" wrote in message
...
My data is in the following format

A B
1 2
1 0
2 0

I want to count how often there is a "1" in column A and a corresponding 2
(in the same row) in colum B

Thanks




CLR

=SUMPRODUCT((A1:A3=1)*(B1:B3=2))

Vaya con Dios,
Chuck, CABGx3


"Lee" wrote in message
...
My data is in the following format

A B
1 2
1 0
2 0

I want to count how often there is a "1" in column A and a corresponding 2
(in the same row) in colum B

Thanks





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

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