I have a timecard I have created that I am having some trouble with 1 particular formula. Our state law on OT is over 40, not over 8 and our employer allows us to work more one day to make up hours another day. So I can't use some of the formulas I have seen out there. What I need it to do is calculate OT on days where over 8 hours were worked, but only if over 40 hours were worked that entire week.
This is the formula I have now, but it calculates the same OT hours over and over. So if I worked 1 hr OT over 40 hours, it is putting that on every day and giving me 5 hours OT total.
=IF(((C14-B14)+(E14-D14))+((C15-B15)+(E15-D15))+((C16-B16)+(E16-D16))+((C17-B17)+(E17-D17))+((C18-B18)+(E18-D18))*24>40,0,(((C14-B14)+(E14-D14))+((C15-B15)+(E15-D15))+((C16-B16)+(E16-D16))+((C17-B17)+(E17-D17))+((C18-B18)+(E18-D18)))*24-40)
Here is a snapshot of the spreadsheet. The above formula is found in the 5 cells below "OT Hours."
This is the formula I have now, but it calculates the same OT hours over and over. So if I worked 1 hr OT over 40 hours, it is putting that on every day and giving me 5 hours OT total.
=IF(((C14-B14)+(E14-D14))+((C15-B15)+(E15-D15))+((C16-B16)+(E16-D16))+((C17-B17)+(E17-D17))+((C18-B18)+(E18-D18))*24>40,0,(((C14-B14)+(E14-D14))+((C15-B15)+(E15-D15))+((C16-B16)+(E16-D16))+((C17-B17)+(E17-D17))+((C18-B18)+(E18-D18)))*24-40)
Here is a snapshot of the spreadsheet. The above formula is found in the 5 cells below "OT Hours."
Excel 2010 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | Wolgast Corporation | ||||||||||
2 | |||||||||||
3 | 4835 Towne Centre | ||||||||||
4 | Suite 203 | ||||||||||
5 | Saginaw, MI 48604 | ||||||||||
6 | Ph: 989-790-9120 Fx: 989-790-9053 | ||||||||||
7 | |||||||||||
8 | Employee Name: | Wendy Heath | Title: | Project Manager Assistant | |||||||
9 | Employee Number: | 1781 | Status: | Full-Time Hourly | |||||||
10 | Department: | Project Management | Supervisor: | Stephen R. Seibert | |||||||
11 | |||||||||||
12 | |||||||||||
13 | Date | Start Time | Time Out | Time In | End Time | Regular Hours | OT Hours | Total Hours | |||
14 | 07/18/16 | 8:00 AM | 12:45 PM | 1:45 PM | 5:00 PM | 8.00 | 0.50 | 8.50 | |||
15 | 07/19/16 | 8:00 AM | 12:30 PM | 1:00 PM | 5:00 PM | 8.50 | 0.50 | 9.00 | |||
16 | 07/20/16 | 8:00 AM | 12:00 PM | 1:00 PM | 5:00 PM | 8.00 | 0.50 | 8.50 | |||
17 | 07/21/16 | 8:00 AM | 12:00 PM | 1:00 PM | 5:00 PM | 8.00 | 0.50 | 8.50 | |||
18 | 07/22/16 | 8:00 AM | 12:00 PM | 1:00 PM | 5:00 PM | 8.00 | 0.50 | 8.50 | |||
19 | WEEKLY TOTALS | 40.50 | 2.50 | 43.00 | |||||||
20 | |||||||||||
21 | |||||||||||
22 | |||||||||||
23 | Comments: | ||||||||||
24 | |||||||||||
25 | |||||||||||
26 | |||||||||||
27 | |||||||||||
28 | Employee Signature: | Date: | 07/22/16 | ||||||||
29 | |||||||||||
30 | Supervisor Signature: | Date: | |||||||||
Sheet1 |