I have a list of times. Every time an action is done it adds the time it happened to a log file. I would like to get the average for actions/hour. But I don't want to average in the times that there is a gap between actions greater then 10 minutes.
So for example:
+--------------------+
11:09 AM |
+--------------------+
11:02 AM |
+--------------------+
10:57 AM |
+--------------------+
10:50 AM |4 actions 29 minutes - *12:04-10:50 = 1 hour 14 minutes >= 10 minutes
+--------------------+
12:04 PM |
+--------------------+
12:01 PM |
+--------------------+
12:01 PM |
+--------------------+
11:56 AM |
+--------------------+
11:56 AM |
+--------------------+
11:55 AM |
+--------------------+
11:55 AM |
+--------------------+
11:55 AM |8 actions 9 minutes *1:19-11:55 = 1 hour 24 minutes >= 10 minutes
+--------------------+
1:19 PM |
+--------------------+
1:18 PM |
+--------------------+
1:18 PM |
+--------------------+
1:17 PM |
+--------------------+
1:17 PM |
+--------------------+
1:16 PM |
+--------------------+
1:16 PM |
+--------------------+
1:16 PM |8 actions 3 minutes *1:16-1:06 = 10 minutes >= 10 minutes
+--------------------+
1:06 PM |
+--------------------+
1:06 PM |
+--------------------+
1:06 PM |
+--------------------+
1:06 PM |
+--------------------+
1:06 PM |
+--------------------+
1:06 PM |6 actions 1 minute *End of Data Sample
+--------------------+
26 actions complete in 42 minutes (37.1 actions/hour)
NOT
26 actions completed in 1 hour 57 minutes (13.3 actions/hour)
I would prefer a Formula Based Answer but if not possible then VBA will be fine too.
Edit Extra Sample
I want an average of how many actions are recorded for any random hour length of time but I don't want to include any time spans the are between actions done more then 10 minutes apart.
So if from 1:15-5:45 we do 1125 "actions" and from 6:30-7:30 we do 300 "actions" thats 1425 "actions" done in 5.5 hours
That ends up being about 260 "actions/hour" (1125+300 = 1425) done from (1:15-5:45) OR 4.5 hours plus (6:30-7:30) OR 1 hour for a total of 5.5 hours NOT (1:15-7:30) OR 6.25 hours
But if we include the time from 5:45-6:30 that nothing was done it makes the average 228 "actons/hour" much lower then the real average of used time. Hope this helps clear up any confusion