ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNTIF and multiple conditions (https://www.excelbanter.com/excel-worksheet-functions/47513-countif-multiple-conditions.html)

Sami

COUNTIF and multiple conditions
 
Here is a simplified explanation of what I am trying to do:

I have created a table, where Column A contains some data, in Column B user
selects a category (A, B, C,...) and in Column C user sets a priority (1, 2
or 3).

Now, I am trying to count how many rows we have, where something has been
written in Column A, Column B has been set to A and Column C has been set to
1.

I have tried this as follows: COUNTIF(Column A; AND(Column B = A; Column C =
1), but it doesn't work. Any ideas?

Roger Govier

Hi Sami

One way
=SUMPRODUCT(--($B$2:$B$100="A"),--($C$2:$C$100=1))

Change ranges to suit.
Regards

Roger Govier


Sami wrote:
Here is a simplified explanation of what I am trying to do:

I have created a table, where Column A contains some data, in Column B user
selects a category (A, B, C,...) and in Column C user sets a priority (1, 2
or 3).

Now, I am trying to count how many rows we have, where something has been
written in Column A, Column B has been set to A and Column C has been set to
1.

I have tried this as follows: COUNTIF(Column A; AND(Column B = A; Column C =
1), but it doesn't work. Any ideas?



All times are GMT +1. The time now is 06:25 AM.

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