+ Reply to Thread
Results 1 to 9 of 9

Need Help to get a formula that calculates my total shift time pls

  1. #1
    Registered User
    Join Date
    02-03-2013
    Location
    maldives
    MS-Off Ver
    Excel 2007
    Posts
    14

    Need Help to get a formula that calculates my total shift time pls

    hey all,

    I need help please to find a formula that accurately calculates my total shift time. Most of my guys work a split shift. So I have a formula that works for that, but if they work past midnight that formula fails. So I tried a MODE function that works ok, but I am still missing two things how to subtract the break time form my total and then split this into two cell one showing the worked hrs and the other the overtime or if the hrs worked are less than 8 .. I have spend the last 5 hrs reading threats and I found a lot but there is always one component missing. So I appreciate any help I can get.. Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need Help to get a formula that calculates my total shift time pls

    answered to the wrong question.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Re: Need Help to get a formula that calculates my total shift time pls

    This might give a hint
    //Ola

    O11: =SUM((E11-D11)+(G11+(F11>G11)-F11)-H11) --- could be enclosed by =IFERROR(...,"")
    Q11: =IF(O11>8/24,8/24,O11)
    R11: =IF(O11>Q11,O11-Q11,0)
    Mark the problem as Solved under the Yellow bar up Top right, under Thread Tools, when you received a solution.
    It saves time, to skip already solved threads.

  4. #4
    Registered User
    Join Date
    02-03-2013
    Location
    maldives
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Need Help to get a formula that calculates my total shift time pls

    thank you Olasa for your swift help.... this is great help, but it does not work if the finishing time is past midnight. Any idea? I also need to keep track if the total hrs worked are less than 8 , as seen in row 23. Would really appriciate your help.

    TY

  5. #5
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Re: Need Help to get a formula that calculates my total shift time pls

    Can you explain what it should be?
    Encl. file with the 3 formulas
    //Ola
    Attached Files Attached Files

  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Need Help to get a formula that calculates my total shift time pls

    Quote Originally Posted by olasa View Post
    This might give a hint
    //Ola

    O11: =SUM((E11-D11)+(G11+(F11>G11)-F11)-H11) --- could be enclosed by =IFERROR(...,"")
    Q11: =IF(O11>8/24,8/24,O11)
    R11: =IF(O11>Q11,O11-Q11,0)

    O11: =SUM((E11-D11)+(G11+(F11>G11)-F11)-H11)

    SUM function doesn't do any better in this case, just remove i t.

    O11: = (E11-D11) + (G11+(F11>G11)-F11) - H11

  7. #7
    Registered User
    Join Date
    02-03-2013
    Location
    maldives
    MS-Off Ver
    Excel 2007
    Posts
    14

    Talking Re: Need Help to get a formula that calculates my total shift time pls

    Thanks...The formula works. Now to my other issues, if the worked amount of hrs Q is less than 8 than R should be a negative, as in hours owed. How can I include that into the formula =IF(O12>P12,O12-P12,0)..... and on top of that I really feel confused how to you enclose an IFERROR funcion into my formula...thanks guys..!!
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Re: Need Help to get a formula that calculates my total shift time pls

    Here are two alternatives:
    //Ola


    Cell Q11:
    Alt. 1. =O11-8/24 --- But first Go into the Excel settings menu. And under Advanced settings, tick: Use 1904 date system. This might have some other drawbacks but it's the easiest for this sheet.
    Alt. 2. =IF(O11>=8/24,O11-P11,TEXT(8/24-P11,"-tt:mm")) --> change the number to a text (fake negative = difficult to sum).

  9. #9
    Registered User
    Join Date
    02-03-2013
    Location
    maldives
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Need Help to get a formula that calculates my total shift time pls

    excellent thank you.. One more please.. how do I enclose a IFERROR to my formula.=SUM((E24-D24)+(G24+(F24>G24)-F24)-H24)...thank you

+ Reply to Thread

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