ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countif with a changing range (https://www.excelbanter.com/excel-worksheet-functions/98656-countif-changing-range.html)

Rayo K

Countif with a changing range
 
I think I've done this before but I can't remember how. I have a table with
consecutive dates in one column and values in second column. I want to count
the number of values that are greater than a specific number within a given
date range. The date range is to be set by two cells with a start date and
end date.

How can I best do this?

Barb Reinhardt

Countif with a changing range
 
Let's say your

dates are in A1:A100,
Values are in B1:B100
Start date is in C1
End date is in D1
Specific # that you want to check values against is in E1
=sumproduct((A1:A100=C1),(A1:A100<=D1),(B1:B100E 1))

"Rayo K" wrote:

I think I've done this before but I can't remember how. I have a table with
consecutive dates in one column and values in second column. I want to count
the number of values that are greater than a specific number within a given
date range. The date range is to be set by two cells with a start date and
end date.

How can I best do this?


Rayo K

Countif with a changing range
 
Hmmm. It didn't seem to work. I ended up with zero. The result should have
been 14. AM I doing anything wrong in this formula?


=SUMPRODUCT(('Stat Datasheet'!B4:B189$B$5),('Stat Datasheet'!A4:A189'Stat
Worksheet'!F5),('Stat Datasheet'!A4:A189<'Stat Worksheet'!F6))

"Barb Reinhardt" wrote:

Let's say your

dates are in A1:A100,
Values are in B1:B100
Start date is in C1
End date is in D1
Specific # that you want to check values against is in E1
=sumproduct((A1:A100=C1),(A1:A100<=D1),(B1:B100E 1))

"Rayo K" wrote:

I think I've done this before but I can't remember how. I have a table with
consecutive dates in one column and values in second column. I want to count
the number of values that are greater than a specific number within a given
date range. The date range is to be set by two cells with a start date and
end date.

How can I best do this?



All times are GMT +1. The time now is 10:09 PM.

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