Tuesday, February 8, 2011

yogi_ComputeHoursWorkedMidnightToMidnight


Yogi Anand, D.Eng, P.E.                                         Google Spreadsheet                            www.energyefficientbuild.com


3 comments:

  1. Yes that did work but now can I add another function I want to do. I work on a 70 hour week based on the last 8 days.
    So if I have work the hours above for five days plus
    5 hrs on the 6th
    5 hrs on the 7th
    5 hrs on the 8th
    which would be a total of 47.5 hrs subtracted from the 70 will show I have 22.5 hours available on the 9th.
    Then every time we add a new day it needs to calculate the previous 8 days.
    The other thing if possible is the time shows a period of 34 hours that I did not work the hours for the previous 8 days can reset to 70 and start from that day counting hours down.

    Again thanks for your help.
    David

    ReplyDelete
  2. I did find one problem on the first formula if I have a start time of
    2/1/10 20:00 to
    2/2/10 2:00 and
    I put in date column 2/1/10 hrs worked comes up N/A
    2/2/10 hrs worked comes up N/A also
    It will not pick up the 4hrs of the 1st or the 2hrs of the 2nd

    ReplyDelete
  3. Hi David:

    In regard to your comment about the formula not giving the correct result for time period of
    2/1/2010 to
    2/2/2010,
    some troubleshooting showed that I needed to incorporate the IFERROR function in my formulation ... with that fix it works now. I have added a sheet HoursWorked01 as an illustration to show its working.

    Regarding 'I work on a 70 hour week based on the last 8 days '
    my apologies ... I did not quite follow what you intend to do -- I hope with the formulas I have set up here you are able to incorporate these and come up with a solution.

    ReplyDelete