ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count cells with specific values in the cells next to them? (https://www.excelbanter.com/excel-worksheet-functions/44476-count-cells-specific-values-cells-next-them.html)

Christopher

Count cells with specific values in the cells next to them?
 
I have two columns similar to below:

Status Days Overrun
Released 0
Released 5
Planning 0
Build 1

I am trying to count up the number of projects (rows) that are released and
have 0 days overrun. I can use COUNTIF to count the number of Days Overrun
cells that equal zero. But what I can't seem to do is to only count the Days
Overrun items that have been Released based on the cell value right next to
it. Does anyone know of a way to do this? It seems similar to a SQL Query
WHERE clause but I'm new to using functions in this way. Thank you so much I
appreciate it!

Christopher



Anne Troy

Try this, Christopher:
http://www.officearticles.com/excel/...ft_excel.h tm
************
Anne Troy
www.OfficeArticles.com

"Christopher" wrote in message
...
I have two columns similar to below:

Status Days Overrun
Released 0
Released 5
Planning 0
Build 1

I am trying to count up the number of projects (rows) that are released
and
have 0 days overrun. I can use COUNTIF to count the number of Days
Overrun
cells that equal zero. But what I can't seem to do is to only count the
Days
Overrun items that have been Released based on the cell value right next
to
it. Does anyone know of a way to do this? It seems similar to a SQL
Query
WHERE clause but I'm new to using functions in this way. Thank you so
much I
appreciate it!

Christopher





bj

try sumproduct()
=sumproduct(--(statusrange = "Released"),--(overunrange = 0))
the arrays in eacch section must be the same size, but cannot be the
shorthand for full columns or rows(A:A won't work)
the --( changes the logical true false to a numeric 1 0

"Christopher" wrote:

I have two columns similar to below:

Status Days Overrun
Released 0
Released 5
Planning 0
Build 1

I am trying to count up the number of projects (rows) that are released and
have 0 days overrun. I can use COUNTIF to count the number of Days Overrun
cells that equal zero. But what I can't seem to do is to only count the Days
Overrun items that have been Released based on the cell value right next to
it. Does anyone know of a way to do this? It seems similar to a SQL Query
WHERE clause but I'm new to using functions in this way. Thank you so much I
appreciate it!

Christopher




All times are GMT +1. The time now is 01:46 AM.

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