+ Reply to Thread
Results 1 to 12 of 12

Formula to add every 25-30 minutes overtime

  1. #1
    Registered User
    Join Date
    06-21-2019
    Location
    Indonesia
    MS-Off Ver
    2013
    Posts
    18

    Formula to add every 25-30 minutes overtime

    So, I want to count overtime. An employee gets counted for overtime for every 30 minutes.
    But we give them a little stretch, that they also get counted for 30 minutes even when they work overtime for 25 minutes.

    For example:
    John Doe checked in at 08:00 a.m and checkout at 05:25 p.m yesterday. He has 1 hour break time in between, so that means he has worked for 8 hours 25 minutes.
    The normal work hours is 8 hours, so that means he has worked overtime for 25 minutes.

    So, how the formula would be I wonder?

    I hope somebody can help, thank you very much.

    Btw, I attached a sample of how the table would look like, and I also figure out the simple formula to count the raw overtime.
    However, what I need is, if their overtime is less than 25 minutes, then the overtime column would display as 0.
    If their overtime is more than 25 minutes, it will display 00:30
    If the overtime is 50 minutes, it will display as 01:00.
    So its every 25-30 minutes... I think.

    I hope the explanation is clear.
    Attached Files Attached Files
    Last edited by naveron; 06-22-2019 at 10:28 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Formula to add every 25-30 minutes overtime

    Try this...
    =IF((E5-(D5-C5)-B5)-F5 < TIME(0,25,0),0,(E5-(D5-C5)-B5)-F5)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-21-2019
    Location
    Indonesia
    MS-Off Ver
    2013
    Posts
    18

    Re: Formula to add every 25-30 minutes overtime

    Hi FDibbins,

    Thank you very much for your reply.

    I've tried the formula you suggest, it worked for the < 25 minutes overtime (it displays as 0).
    However, the 25 minutes overtime still display as 25 minutes, not 30 minutes,
    and the 50 minutes overtime still display as 50 minutes, not 1 hour.

    Appreciate your help a lot. I hope there will be a way to figure this out. Thank you.

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,230

    Re: Formula to add every 25-30 minutes overtime

    Why does 50 minutes go to 1 hour and not 55 minutes? I'm assuming 49 minutes goes to 30 minutes? what does 1 hour and 15 minutes go to (which is 25 minutes past 50 minutes OT)?

  5. #5
    Registered User
    Join Date
    06-21-2019
    Location
    Indonesia
    MS-Off Ver
    2013
    Posts
    18

    Re: Formula to add every 25-30 minutes overtime

    Hi Gregb11,

    Because I was thinking of multiplication of 25-30 minutes. So if the overtime reached 50 minutes (which is twice 25 minutes), then it will be rounded as 1 hour.

    That's what I was thinking.

  6. #6
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,230

    Re: Formula to add every 25-30 minutes overtime

    You didn't answer the other question. So what if it's 1 hour and 15 minutes (which is 3 times 25). Using the same logic that would go to 1.5 hours, and so on. If you continue with this logic, I don't believe it will make sense.

  7. #7
    Registered User
    Join Date
    06-21-2019
    Location
    Indonesia
    MS-Off Ver
    2013
    Posts
    18

    Re: Formula to add every 25-30 minutes overtime

    Gregb11:

    Oh, didn't think that way or that far... umm, nah, I guess I don't have a clue. lol

    I guess your previous question made more sense, 55 minutes round up as 1 hour.

  8. #8
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,230

    Re: Formula to add every 25-30 minutes overtime

    So it sounds like what you want to do is if the person works less than 25 minutes OT, that it's rounded down to 0. If they work from 25 minutes to less than 55 minutes OT, then it rounds (up or down) to 30 minutes. If they work 55 minutes to less than 1 hour and 25 minutes, it goes to 1 hour, and so on. Is this correct?

  9. #9
    Registered User
    Join Date
    06-21-2019
    Location
    Indonesia
    MS-Off Ver
    2013
    Posts
    18

    Re: Formula to add every 25-30 minutes overtime

    Yes, you get what I mean perfectly. Thank you!

  10. #10
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,230

    Re: Formula to add every 25-30 minutes overtime

    This formula should work:
    =MROUND(ABS(H7-25/60/60),30/(60*24))

    You can shorten it by doing the math, but I left it like this so you get an idea of how I got to the formula (subtracting 25 minutes and then rounding to a multiple of 30 minutes).

  11. #11
    Registered User
    Join Date
    06-21-2019
    Location
    Indonesia
    MS-Off Ver
    2013
    Posts
    18

    Re: Formula to add every 25-30 minutes overtime

    Gregb11:

    Just tried it, worked great! Thank you so much!

  12. #12
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula to add every 25-30 minutes overtime

    Try changing your formula in G5 to
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Calculating Overtime Hours for each Day on a 40+ Overtime per Week Basis
    By HumdrumPanic in forum Excel General
    Replies: 5
    Last Post: 09-30-2020, 12:55 PM
  2. [SOLVED] Overtime formula when dealing with total minutes
    By mrteater in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-11-2019, 01:18 PM
  3. Calculating daily overtime and weekly overtime
    By Guy Montague in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-22-2016, 04:55 PM
  4. Replies: 3
    Last Post: 01-21-2016, 06:07 PM
  5. Replies: 7
    Last Post: 10-07-2014, 10:00 PM
  6. [SOLVED] Add an amount to wages if Overtime worked, but show zero if there is no overtime
    By KazzICC in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-14-2014, 01:55 AM
  7. [SOLVED] Formula for minutes to days:hours:minutes
    By QueenCutieT in forum Excel General
    Replies: 3
    Last Post: 02-09-2005, 09:06 PM

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