View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
LoriB LoriB is offline
external usenet poster
 
Posts: 7
Default COUNTIF by date range problem

I tried that, it didn't work either. I've been playing with the formula but
continually get errors or incorrect data. It might be summing and not
counting.

"Roger Govier" wrote:

Hi
then change the formula to
=SUMPRODUCT(($A2$A$1000=$D2)*
($A$2:$A$1000<=$D2+6)*($B$2:B$10005))


--
Regards
Roger Govier

"LoriB" wrote in message
...
Hi Roger,

Thanks for the reply but the formula is returning an error. I'm not sure
if
it's because of a problem in the formula or that I'm using 2002. Or it
could
be that the time column is not formulated as time just as a number with 2
decimal places.

I have
=SUMPRODUCT(--(D2:D31719<="7/26/2008"+0),--(D2:D31719"7/19/2008"+0),G2:G31719)
which finds the total but is more cumbersome than your formula as I am
manually entering the date ranges.

Thanks

"Roger Govier" wrote:

Hi

Assuming your dates are in column A and Times in column B

in D2 Enter your week start date
In E2
=SUMPRODUCT(($A2$A$1000=$D2)*
($A$2:$A$1000<=$D2+6)*($B$2:B$1000TIME(0,5,0)))
Will give the Count of Times Greater than 5 minutes in that week.
If you enter in F2
=SUMPRODUCT(($A2$A$1000=$D2)*
($A$2:$A$1000<=$D2+6))
That will give a Count of all times for that Week.
G2
=E2/F2*100

If you made E3
=E2+7
then that would step up the starting week dates for you without you
having
to type them.

Copy formulae down as required
--
Regards
Roger Govier

"LoriB" wrote in message
...
Hello,

I have a sheet that shows data for several months, it has multiple
instances
of each day (7/1/2008 may appear in 40 rows) as the data is from
different
sources. It has another column that shows the amount of time an even
happened for each date in minutes. I need to filter this information
by
week
and by the count of times 5 minutes to get the percent of time 5
minutes
this even happened each week. Just to make matters more difficult the
data
will be updated each week, thankfully it will be added to the end of
the
table so I can just past down the formula.
I'd really appreciate some help with this because a COUNTIF formula
keeps
returning errors.
Thank you