+ Reply to Thread
Results 1 to 11 of 11

Formula to Calculate Overtime Hours

  1. #1
    Registered User
    Join Date
    12-05-2015
    Location
    Utah
    MS-Off Ver
    Office 2016
    Posts
    4

    Formula to Calculate Overtime Hours

    I've been using a time sheet I built in Excel for some time that uses Bi-Monthly pay periods. My employees get paid (hourly+#of jobs completed, + upsales). Recently, we implemented new hours for our employees and I need to track/pay overtime. Here's a screenshot of what I'm working with, then I'll explain the problem.

    I am not able to insert an image.
    http://i.imgur.com/OrSEK8C.jpg

    I change the month/pay period and the sheet will automatically change the days listed in 'Day'. This is where the problem lies. Some pay periods start with Monday, some Wednesday, etc... Some pay periods also end in the middle of the week.

    Originally I wanted a formula in cell E24 to calculate overtime hours between Monday - Saturday. But if I do that, I will have scenarios where I need to use the previous time period to calculate overtime. Any ideas for this formula?

    Edit: The more I think about this, I'm realizing most solutions I have will just raise new problems. Maybe the best solution to automate overtime calculations is to switch to Bi-Weekly pay, instead of Bi-Monthly, which would require a new sheet. Or I just need to manually calculate overtime for each employee, every pay period, ugh. Any other solutions?

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

    Re: Formula to Calculate Overtime Hours

    What are the conditions to decide what is classed as overtime?

    If you click the 'Advanced' button when typing your reply, then click the paperclip in the top row of icons above the editor window, then you can attach a sample excel file instead of posting images.

    If you type in the expected results, it helps us to see what you are trying to do.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to Calculate Overtime Hours

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    Don't upload pictures, - see guidance in the rules area, they are rarely much use, or worse still point us to file hosting sites of unknown provenance. You have a workbook presumably and none of us want to spend time creating it
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    12-05-2015
    Location
    Utah
    MS-Off Ver
    Office 2016
    Posts
    4

    Re: Formula to Calculate Overtime Hours

    Attached is a copy of my basic workbook.

    Everything works perfectly, except for overtime, which is calculated in D24:F24.
    Currently I have a formula in E24 that calculates overtime for any hours over 80 in the pay period. This is not correct.
    It needs to be any hours over 40 per week (Mon-Sun).

    Refer to my first post for more details.

    Thanks
    Attached Files Attached Files

  5. #5
    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
    52,942

    Re: Formula to Calculate Overtime Hours

    Why do you have 13 days (instead of just 12)? Would a week not go from Tues to Mon? Yours seems to go from Tues to Tues - that is 8...or 15...days?

    If you want to test for just 1 week, maybe...
    =IF(SUM(G5:G11)>40,SUM(G5:G11)-40,0)
    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

  6. #6
    Registered User
    Join Date
    12-05-2015
    Location
    Utah
    MS-Off Ver
    Office 2016
    Posts
    4

    Re: Formula to Calculate Overtime Hours

    @FDibbins, We pay bimonthly, not biweekly. The imgur is only halfway filled out.

    If you change the Month, Pay Period, or Year, you'll see 'Date' and 'Day' will change accordingly. So each pay period will start and end on a different day, but I need to pay overtime for each period of Monday-Sunday.

  7. #7
    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
    52,942

    Re: Formula to Calculate Overtime Hours

    OK, you said you wanted to test hours over 40, so how does that fit in?

  8. #8
    Registered User
    Join Date
    12-05-2015
    Location
    Utah
    MS-Off Ver
    Office 2016
    Posts
    4

    Re: Formula to Calculate Overtime Hours

    What do you mean? If total hours between Monday and Sunday is over 40, I need to add that amount in overtime pay. Most pay periods will start somewhere in the middle of the week, so I will need to reference some data from the previous pay period.

    Right now, I manually go through each employee and add overtime pay to each paycheck. I am searching for a way to automate this, given the data I already have.

    Maybe this will make more sense.

    Red = Pay Period 1
    Green = Pay Period 2

    30 Mon
    31 Tue
    1 Wed
    2 Thu
    3 Fri
    4 Sat
    5 Sun
    6 Mon
    7 Tue
    8 Wed
    9 Thu
    10 Fri
    11 Sat
    12 Sun
    13 Mon
    14 Tue
    15 Wed

    16 Thu
    17 Fri
    18 Sat
    19 Sun
    20 Mon
    21 Tue
    22 Wed
    23 Thu
    24 Fri
    25 Sat
    26 Sun
    27 Mon
    28 Tue
    29 Wed
    30 Thu


    For Pay Period 1 I need to pay overtime for (30 Mon:5 Sun) and (6 Mon:12 Sun).
    For Pay Period 2 I need to pay overtime for (13 Mon:19 Sun) and (20 Mon:26 Sun).

    The hard part for me is creating a formula that works in every situation (First day of pay period is Mon, Tues, Wed, etc...)

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

    Re: Formula to Calculate Overtime Hours

    Where is the data for the hours coming from? Is there a hidden sheet that holds all of the history?

    Without a more practical pay frequency such as 2 weekly, the only thing that comes to mind is to assume that all employees work 8 hours every weekday and anything over that, or at weekends is overtime and use that to calculate on a daily basis.

    You could use historical data from the previous period to work out overtime for the part week at the beginning of the current period, but unless you can see into the future, you will have nothing to refer to in order to accurately calculate the part week at the end that runs into the next period.

    You could offset the overtime and use data from the current and previous period to calculate it, (for example, overtime paid from the Monday on or before the first day in the current period until the last sunday in the current period, with anything after that being carried over to the next), but I think that would get messy too.

  10. #10
    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
    52,942

    Re: Formula to Calculate Overtime Hours

    You still have more than 2 weeks in your period? Thur to Thur is 15 days.

    And regarding your statement...
    If total hours between Monday and Sunday is over 40
    is that for a 1 week (7 days) period or 2 week (14 days) period?

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to Calculate Overtime Hours

    Hi,

    As Jason requested back in post #2 you'd be better advised to manually add the results you expect along with a note explaining how you have calculeted each result with reference to the cells you used in the calculation.

+ 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. Formula to calculate regular hours and overtime hours
    By judojames in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2014, 05:30 PM
  2. [SOLVED] Need Formula to Calculate Overtime from Daily hours for a whole week
    By KazzICC in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-13-2014, 08:05 PM
  3. Replies: 2
    Last Post: 01-17-2014, 02:22 PM
  4. IF formula to calculate overtime after certain hours
    By danielllouise in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-26-2013, 03:39 PM
  5. Replies: 8
    Last Post: 06-11-2013, 05:34 PM
  6. [SOLVED] 40 Hours per week / how to calculate overtime hours
    By hudsonic72 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-07-2013, 02:33 AM
  7. Subtracting hours from time to calculate overtime hours
    By nabilishes in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 10-16-2012, 08:56 AM

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