Thread: Figuring hours
View Single Post
  #4   Report Post  
Blue Hornet
 
Posts: n/a
Default


scott45 wrote:
Chris
The formula works but what happens if the plant runs a full 24 hours in one
day I am not sure how to enter the time start and shut down. I do not get
hours run when entering in start at midnight and shut down at midnight.
thanks


Scott

Okay, I imagined you'd get around to this ... lol.

Set up your columns so that your Start and Stop entries contain both
Date AND Time elements. So, for example, your column A values might be
entered like:
Start Date & Time
8/1/05 8:00
8/1/05 10:00
8/1/05 12:00
8/2/05 15:00
8/3/05 17:00
8/3/05 21:00
8/3/05 22:45

Column B as:
Stop Date and Time
8/1/05 9:00
8/1/05 11:00
8/2/05 13:30
8/3/05 13:00
8/3/05 19:00
8/3/05 22:40
8/3/05 23:05

Column C "This Run" formula is now:
=IF( AND( ISNUMBER( A2), ISNUMBER( B2)), B2 - A2, IF( ISNUMBER(
A2),NOW() - A2, ""))
(Entered at C2 and copied downward)

Column D "Daily Run" is:
=IF( AND( ISNUMBER( A2), ISNUMBER( B2), DAY( A2) = DAY( B2)), B2 - A2,
"")

Column E "Total Run Time by Day" is:
=IF( AND( ISNUMBER( A3), ISNUMBER( A2), DAY( A2) = DAY( B3)), "", D2)

If you use these entries as I have shown, you'll get values in column E
as:
Total Run Time by Day
[BLANK] [Still accumulating time for 8/1/5]
0:2:00 [Showing two hours run on 8/1/5]
1:3:30 [Showing one day, three and one-half hours, from 8/1/5 to
8/2/5]
0:22:00 [Showing twenty-two hours run from 8/2/5 to 8/3/5]
[BLANK] [Still accumulating time for 8/3/5]
[BLANK] [Still accumulating time for 8/3/5]
0:4:00 [Showing four hours run on 8/3/5 -- doesn't include any part of
the 22 hours above -- oh, well.]

Formatting in E is set to show "d:h:mm", which I believe is a standard
"Custom" format (isn't that an oxymoron?).

I hope this has given you ideas to work with; I really don't have more
time to design the sheet for you.

Chris