calculating hours worked on shift

keithcuda

New Member
Joined
Jan 15, 2013
Messages
29
I'm thinking this is a pretty easy one.

I am doing a new schedule at work and if the total number of hours in a work week are greater than 80, then it will need to be calculated with overtime.

basically what I am trying to think of is; the result is 84, then 80*x=y, then the 4 remaining hours would be 4*1.5x=w, then add them together to get a total, y+w=total earnings

anything over 80 would be time and one half.

I am using this formula to count the days worked, 1 being first shift and 2 being second shift; =(SUM(COUNTIF(I13:V13,{1,2}))*12)
 
Gaz im tracking you now...

two week pay period. the first week would be 48 hours and the second would be 36. So actually it would be 8 hours of overtime, because anything over 40 is time and a half. sorry, its 3am here :(
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I would like one value for both. a formula that will come up with the exact amount. No need to split them
 
Upvote 0
Test this

=MIN(40,COUNT(I13:O13)+MIN(40,COUNT(P13:V13))*12)*A3+MAX(0,COUNT(I13:O13)*12-40+MAX(0,COUNT(P13:V13))*12-40)*A3*1.5
 
Upvote 0
Gaz something doesnt seem right.

lets say A3 = 10
for the first week totaling 48 hours, that would equal = 520
for the second week totaling 36 hours, that would equal= 360
totaling 880

Your formula came up with 460...
 
Upvote 0
Sorry made a mistake with the parentheses

=(MIN(40,COUNT(I13:O13)*12)+MIN(40,COUNT(P13:V13)*12))*A3+(MAX(0,COUNT(I13:O13)*12-40)+MAX(0,COUNT(P13:V13)*12-40))*A3*1.5
 
Last edited:
Upvote 0
That seems to work a lot better!!! Thank you so much.

Now if i only knew what it was doing, so if i needed to change it later i could :eek:

Any chance you could break that down to the 3rd grade level and try to explain to me what is going on?


Cheers :)
 
Upvote 0
OK I repeated the same formula twice to cater for the 2 weeks each having normal hours of 40.
Count is doing the same as your countif (note count only counts numbers).
Min will return the smallest number between 40 and the count X 12, so if over 40 it will return 40.
Repeat for 2nd weeks then add together and X A3
Then calculate the O/T for each week
Max will return the largest number between 0 and the count x12 minus 40

=(MIN(40,COUNT(I13:O13)*12)+MIN(40,COUNT(P13:V13)*12))*A3+(MAX(0,COUNT(I13:O13)*12-40)+MAX(0,COUNT(P13:V13)*12-40))*A3*1.5

Hope that makes sense!!

Gaz
 
Upvote 0

Forum statistics

Threads
1,215,417
Messages
6,124,791
Members
449,188
Latest member
Hoffk036

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top