View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default Count if 0 and between dates

That is because the first portion of your formula evaluates to E5:E80=401.6
(2008 divided by 5 divided by 1) and the second is E5:E80<=12.9548 (2008 divided
by 5 divided by 31). There are no numbers greater than 401.6 and less than
12.9548, therefore the answer will always be 0.

If you want the correct answer, use a cell to hold the date or use DATE(year,
month, day) in your formula.

Stilmovin wrote:
=SUMPRODUCT((E5:E80=2008/5/1)*(E5:E80<=2008/5/31)*(P5:P80))
turned result = 0

Result should be = 3

"Lars-Åke Aspelin" wrote:

On Tue, 16 Dec 2008 10:15:02 -0800, Stilmovin
wrote:

I have been looking all over this site trying to find the answer and came up
with nothing.
I have a spread sheet that contains three columns: Date Cost Award
I am trying to count the number of awarded between a date(January)
I have tried the sumproduct and sumif equations to come up with the following

=COUNTIFS(P6:R93,"0",E6:E93,"2008Jan")
- #Value!

=COUNTIF(E5:E80,"=10/9/2008")-COUNTIF(E5:E80,"=10/10/2008")
- This resulted in only counting the dates and not the # of Awarded

HELP!!


Try this formula:

=SUMPRODUCT((E5:E80=startdate)*(E5:E80<=enddate)* (R5:R80))

where startdate and enddate are two cells with those dates, i.e. A1
and A2

The formula gives the sum of award for the corresponding dates.
If you just want to know the number of dates where there has been an
award, change R:R80 to R5:R80<"" in the last part of the formula.

Hope this helps / Lars-Åke