=SUMPRODUCT(--(A1:A58/24),A1:A5-8/24)*(SUM(A1:A5)*24<40)
remember to format the cell with custom format [hh]:mm
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
"Lee" wrote in message
...
Ok. Lets say there is a group of five cells ( A1 thru A5 ). Those cells
are
formatted to show time ( h:mm ). I want to program cell A6 to show any
time
over 8 hours that occurs in each individual cell as well as the sum of the
time over 8 hours of the group. However if the sum of the time of the
group
in total is over 40 hours then I want cell A6 to show zero.
Example: A1= 8:00, A2= 9:00, A3= 9:00, A4=blank, A5=blank, I want A6= 2:00
But if A1= 8:00, A2= 9:00, A3= 9:00, A4=8:00, A5= 8:00, I want A6=
zero
--
Lee D.