Results 1 to 46 of 46

Subtracting hours in a work schedule

Threaded View

  1. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Subtracting hours in a work schedule

    Quote Originally Posted by heel4you
    However, as you can see, in row 8, if an employee works different hours, as in row 8 column G with 2:15-9:15 it does not compute correctly. Even my formula for for 9G is not totally correctly.
    I agree with JB that storage is key, however, to explain the above...

    Time in XL is Decimal and Dates are Integer, ie 24 hours = 1, noon = 0.5, 6am = 0.25, 6 pm = 0.75 etc... (this is why you were multiplying your answer by 24).
    The reason therefore your formula in G9 was not working correctly was that you were adding 0.5 to the end time before subtracting the start time which basically adds 12 hours

    Edit: JB, in your file I'd alter the COUNTA to a COUNT.

    Edit: Edit: I just realised the 0.5 you were adding was to account for end time being entered as say 4:00 rather than 16:00, and so the above was still cause of error but for different reason, ie you don't need to add 12 hours for all end times (only when start time hour > end time hour!)
    Last edited by DonkeyOte; 08-30-2009 at 02:31 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1