ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNTIF with two conditions (https://www.excelbanter.com/excel-worksheet-functions/217989-countif-two-conditions.html)

John

COUNTIF with two conditions
 
I am trying to count values of 9 or greater from column BM only if column U
equals "SHEET2!B6" This is the formula that I thought would work but I
basically need to do a countif with 2 different criterias.


=COUNTIF(SHEET1!U3:U2000, SHEET2!C6, IF(SHEET1!BM3:BM2000=9))

ex. SHEET1 Row 6 column U = JOHN SHEET2 C6 = JOHN SHEET1 Row 6
column BM = 9

This should bring a result of 1...meaning it counted that row as a positive
response.



T. Valko

COUNTIF with two conditions
 
Try it like this:

=SUMPRODUCT(--(Sheet1!U3:U2000=Sheet2!C6),--(Sheet1!BM3:BM2000=9))

--
Biff
Microsoft Excel MVP


"John" wrote in message
...
I am trying to count values of 9 or greater from column BM only if column U
equals "SHEET2!B6" This is the formula that I thought would work but I
basically need to do a countif with 2 different criterias.


=COUNTIF(SHEET1!U3:U2000, SHEET2!C6, IF(SHEET1!BM3:BM2000=9))

ex. SHEET1 Row 6 column U = JOHN SHEET2 C6 = JOHN SHEET1 Row 6
column BM = 9

This should bring a result of 1...meaning it counted that row as a
positive
response.





Max

COUNTIF with two conditions
 
To get this evaluation
=COUNTIF(SHEET1!U3:U2000, SHEET2!C6, IF(SHEET1!BM3:BM2000=9))


untested, but I think you could try this:
=SUMPRODUCT((SHEET1!U3:U2000=SHEET2!C6)*(SHEET1!BM 3:BM2000=9))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---



All times are GMT +1. The time now is 09:19 AM.

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