ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   CountIf with 2 criteria possible? (https://www.excelbanter.com/excel-discussion-misc-queries/144006-countif-2-criteria-possible.html)

duketter

CountIf with 2 criteria possible?
 
Microsoft 2003 - I am trying to do a count of the number of cells that match
my criteria by using the countif command. However, I need it to look at 2
separate criteria items before a match is made. It needs to look in column
B:B first to make sure the criteria is there and then needs to look in column
C:C to make sure the value for that cell is not equal to 0. If those
criteria both match, I want it to bring back the total number of cells this
is true for.

bj

CountIf with 2 criteria possible?
 
try
=sumproduct(--(B1;B100=criteria1),--(C1:C100<0))
the --( changes the logical true false to numeric 1 0
the arrays must be the same size and cannot refer to a full column for pre
2007

"duketter" wrote:

Microsoft 2003 - I am trying to do a count of the number of cells that match
my criteria by using the countif command. However, I need it to look at 2
separate criteria items before a match is made. It needs to look in column
B:B first to make sure the criteria is there and then needs to look in column
C:C to make sure the value for that cell is not equal to 0. If those
criteria both match, I want it to bring back the total number of cells this
is true for.



All times are GMT +1. The time now is 04:56 AM.

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