Use array to calculate incremental weekly costs based on hours worked and rate of pay
Looking to caculate total incremental costs on a weekly basis utilizing an array formula. In the attached file, you will notice columns for an individual's Straight Time and Over Time rates, then columns for dates where hours worked is input. For the pay cycle (two weeks period with the border), the OT rate only comes into play if 80+ hours are worked in that two week period. Now if more than 80 hours are worked in one week, then all hours worked in the next week are OT. It then resets once the two week cycle is complete.
What I need is to calculate on a WEEKLY basis. So you would have to take in consideration the pay cycle (two weeks in the border) and then show the cost for that specific week based on the total hours in that cycle.
1) on the first week of the cycle John works 50 hours and the second week he works 30. All of that time would be ST pay for both weeks.
2) on the first week of the cycle John works 60 hours and the second week he works 60. It would be 60 hours ST for the first week then 20 hours ST and 40 hours OT for the second week.
3) on the first week of the cycle John works 85 hours and the second week he works 50. It would be 80 hours ST and 5 hours OT for the first week then 50 hours OT for the second. EE-sample.xlsxEE-sample.xlsx