View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier[_3_] Roger Govier[_3_] is offline
external usenet poster
 
Posts: 2,480
Default COUNTIF by date range problem

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