ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting non-zero cells based on date (https://www.excelbanter.com/excel-discussion-misc-queries/135587-counting-non-zero-cells-based-date.html)

Rochelle

Counting non-zero cells based on date
 
Can someone please help with this? I can't seem to figure it out. Say I
have one column with a list of dates and another with values that are either
zero or non-zero. How do I count the number of nonzero cells in the second
column after today?

For example:
Column B Column C
3/20/2007 6.5
3/21/2007 0.0
3/22/2007 3.2
3/23/2007 7.8

If today is 3/20/2007 I want Excel to only count the values in Column C for
3/21-3/23 that are non-zero

bj

Counting non-zero cells based on date
 
try
=sumproduct(--(B1:B100today()),--(C1:C100<0))

"Rochelle" wrote:

Can someone please help with this? I can't seem to figure it out. Say I
have one column with a list of dates and another with values that are either
zero or non-zero. How do I count the number of nonzero cells in the second
column after today?

For example:
Column B Column C
3/20/2007 6.5
3/21/2007 0.0
3/22/2007 3.2
3/23/2007 7.8

If today is 3/20/2007 I want Excel to only count the values in Column C for
3/21-3/23 that are non-zero


Rochelle

Counting non-zero cells based on date
 
Thanks a lot! That worked. Now I just have to figure out why it worked lol

"Rochelle" wrote:

Can someone please help with this? I can't seem to figure it out. Say I
have one column with a list of dates and another with values that are either
zero or non-zero. How do I count the number of nonzero cells in the second
column after today?

For example:
Column B Column C
3/20/2007 6.5
3/21/2007 0.0
3/22/2007 3.2
3/23/2007 7.8

If today is 3/20/2007 I want Excel to only count the values in Column C for
3/21-3/23 that are non-zero



All times are GMT +1. The time now is 05:29 PM.

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