ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I COUNTIF in excel using multiple criteria? (https://www.excelbanter.com/excel-worksheet-functions/58077-how-do-i-countif-excel-using-multiple-criteria.html)

DJ_Swammi

How do I COUNTIF in excel using multiple criteria?
 
I am trying to set up a function which looks to see if multiple criteria,
across different columns are met.

Idealy I should think the following function should work, but alas, it does
not:

=COUNTIF(AND(A1:A5=1, B1:B5=2))

Any suggestions?

Ken Wright

How do I COUNTIF in excel using multiple criteria?
 
=SUMPRODUCT((A1:A5=1)*(B1:B5=2)*(C1:C5=3)) etc

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------


"DJ_Swammi" wrote in message
...
I am trying to set up a function which looks to see if multiple criteria,
across different columns are met.

Idealy I should think the following function should work, but alas, it
does
not:

=COUNTIF(AND(A1:A5=1, B1:B5=2))

Any suggestions?




bpeltzer

How do I COUNTIF in excel using multiple criteria?
 
Check this site for using SUMPRODUCT for calculations involving multiple
criteria:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
Another means is using the DCOUNT function.


"DJ_Swammi" wrote:

I am trying to set up a function which looks to see if multiple criteria,
across different columns are met.

Idealy I should think the following function should work, but alas, it does
not:

=COUNTIF(AND(A1:A5=1, B1:B5=2))

Any suggestions?


DJ_Swammi

How do I COUNTIF in excel using multiple criteria?
 
Thank you, this has been very helpful!




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

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