ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   counting problems (https://www.excelbanter.com/excel-worksheet-functions/84746-counting-problems.html)

Metolius Dad

counting problems
 
Dear Wizards,

I have a year's worth of data. Each day is on a row. The number of
patients in the ICU is in col C. The number of those patients that were
'status 7' are in col D. I want to create another grid that tells me: How
many days were there in the year when I had 8 patients AND 4 of them were
status 7? then How many days were there in the year when I had 9 patients
AND 4 of them were status 7? etc. I'm guessing that each of the cells in my
second grid will need to be populated with formulas but I need help with
that/those formulas.

Thanks for being there!
Sam

JMB

counting problems
 
Assuming your data is in C1:D100 (adjust as necessary, but Sumproduct cannot
use an entire column of 65536 rows)
=SUMPRODUCT(--(C1:C100=8), --(D1:D100=4))

But instead of hardcoding the criteria (8 and 4), you could use a reference
to cells that contain the criteria.

"Metolius Dad" wrote:

Dear Wizards,

I have a year's worth of data. Each day is on a row. The number of
patients in the ICU is in col C. The number of those patients that were
'status 7' are in col D. I want to create another grid that tells me: How
many days were there in the year when I had 8 patients AND 4 of them were
status 7? then How many days were there in the year when I had 9 patients
AND 4 of them were status 7? etc. I'm guessing that each of the cells in my
second grid will need to be populated with formulas but I need help with
that/those formulas.

Thanks for being there!
Sam



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

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