Average elapsed time of each item in a list.


Posted by David on October 05, 2001 10:28 AM

Help! I'm trying to make a chart that shows the average elapsed time, by product from a spreadsheet log listing start times, products and end times.

I have a log with an initial date/time in column A, a product in colum B, a closing date/time in column C and the formula to calculate the elapsed time in column D.
.
A.......................B..........C...................D................................
9/25/2001 2:43:36 PM...Apple1.1...9/26/2001 6:59:59 AM...=IF(I1000-A1000>0,I1000-A1000,"")
.
Z1:Z20 contains a list of products
.
I have another sheet with this array formula copied down A1:A20..
{=AVERAGE($D$2:$D$1800)*SUM(ISNUMBER(SEARCH($Z1,$B$2:$B$1800))+0)}

This seems to give me an average "time of day" or a number representing the time of day instead of an average elapsed time which is what I'm looking for.

I hope I haven't made this too confusing to figure out.

Thanks for any ideas.

Posted by Aladin Akyurek on October 05, 2001 11:44 AM

David,

Try for average elapsed times:

=SUMPRODUCT(($B$2:$B$1800=$Z1)*($D$2:$D$1800))/MAX(1,COUNTIF($B$2:$B$1800,$Z1))

Aladin

==========

Posted by David on October 05, 2001 12:17 PM

I just get #VALUE! for this formula...

Posted by Aladin Akyurek on October 05, 2001 12:36 PM

That must be due to the return value "" of the formula that you use in column D.

Try the following modified formula:

=SUMPRODUCT(($B$2:$B$1800=$Z1)*(ISNUMBER($D$2:$D$1800)),($D$2:$D$1800))/MAX(1,COUNTIF($B$2:$B$1800,$Z1))

Aladin

==============



Posted by David on October 05, 2001 12:47 PM

I replaced "" with "0" in the formula and it works great. Thanks!!!!