I have created a timesheet that shows overtime options. I will try to make a copy (can we upload a copy of our file?) I have created checkbox for daily and weekly overtime options. If Daily (True), OT is calculated over 12 hours, if Weekly (True, OT is also calculated over 48 hours per week). Differential pay is paid on evening shifts only.
Total Hours is calculated as:
=ROUND((IF(OR(D14="",E14=""),0,IF(E14<d14,e14+1-d14,e14-d14))+if(or(g14="",h14=""),0,if(h14<g14,h14+1-g14,h14-g14))+if(or(j14="",k14=""),0,if(k14<j14,k14+1-j14,k14-j14))) 1440)
Regular Hours are calculated as:
=+L14-O14
Overtime Hours are calculated as:
=ROUND(MAX(IF($C$7,MAX(0,SUM(M13:M$13)+L14-$C$8/24),0),IF($C$4,IF(L14>$C$5/24,L14-$C$5/24,0),0))/(1/1440),0)*(1/1440)
Where C7 = Weekly Checkbox True, C8 = 48 hours, C4 Daily Checkbox True, C5 - 12 hours
My problem is that the weekly overtime needs to reset based on the weeknum for the payperiod. Does anyone have any suggestions. I can't seem to wrap my head around this one. I have even thought about a cumulative hours column based on weeknum, but can't seem to get that formula right either.
I would appreciate any assistance you can provide.
[TABLE="width: 500"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[TD]L
[/TD]
[TD]M
[/TD]
[TD]O
[/TD]
[TD]P
[/TD]
[TD]Q
[/TD]
[TD]R
[/TD]
[TD]S
[/TD]
[TD]T
[/TD]
[/TR]
[TR]
[TD]Weeknum
[/TD]
[TD]Date
[/TD]
[TD]Shift
[/TD]
[TD]Time in
[/TD]
[TD]Time Out
[/TD]
[TD]Time In
[/TD]
[TD]Time Out
[/TD]
[TD]Time In
[/TD]
[TD]Time Out
[/TD]
[TD]Total Hrs
[/TD]
[TD]Reg Hrs
[/TD]
[TD]OT Hrs
[/TD]
[TD]Diff Hrs
[/TD]
[TD]Diff OT Hrs
[/TD]
[TD]Absent Hrs
[/TD]
[TD]Stat Hrs
[/TD]
[TD]Vac Hrs
[/TD]
[/TR]
[TR]
[TD]44
[/TD]
[TD]Nov 1
[/TD]
[TD]Days
[/TD]
[TD]6:00 am
[/TD]
[TD]12:45 pm
[/TD]
[TD]1:10 pm
[/TD]
[TD]8:00 pm
[/TD]
[TD][/TD]
[TD][/TD]
[TD]13:35
[/TD]
[TD]12
[/TD]
[TD]1.35
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]44
[/TD]
[TD]Nov 2
[/TD]
[TD]Nights
[/TD]
[TD]3:00 pm
[/TD]
[TD]8:45 pm
[/TD]
[TD]9:00 pm
[/TD]
[TD]2:30
am
[/TD]
[TD][/TD]
[TD][/TD]
[TD]11.25
[/TD]
[TD]11.25
[/TD]
[TD][/TD]
[TD]11.25
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
</d14,e14+1-d14,e14-d14))+if(or(g14="",h14=""),0,if(h14<g14,h14+1-g14,h14-g14))+if(or(j14="",k14=""),0,if(k14<j14,k14+1-j14,k14-j14)))>
Total Hours is calculated as:
=ROUND((IF(OR(D14="",E14=""),0,IF(E14<d14,e14+1-d14,e14-d14))+if(or(g14="",h14=""),0,if(h14<g14,h14+1-g14,h14-g14))+if(or(j14="",k14=""),0,if(k14<j14,k14+1-j14,k14-j14))) 1440)
Regular Hours are calculated as:
=+L14-O14
Overtime Hours are calculated as:
=ROUND(MAX(IF($C$7,MAX(0,SUM(M13:M$13)+L14-$C$8/24),0),IF($C$4,IF(L14>$C$5/24,L14-$C$5/24,0),0))/(1/1440),0)*(1/1440)
Where C7 = Weekly Checkbox True, C8 = 48 hours, C4 Daily Checkbox True, C5 - 12 hours
My problem is that the weekly overtime needs to reset based on the weeknum for the payperiod. Does anyone have any suggestions. I can't seem to wrap my head around this one. I have even thought about a cumulative hours column based on weeknum, but can't seem to get that formula right either.
I would appreciate any assistance you can provide.
[TABLE="width: 500"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[TD]L
[/TD]
[TD]M
[/TD]
[TD]O
[/TD]
[TD]P
[/TD]
[TD]Q
[/TD]
[TD]R
[/TD]
[TD]S
[/TD]
[TD]T
[/TD]
[/TR]
[TR]
[TD]Weeknum
[/TD]
[TD]Date
[/TD]
[TD]Shift
[/TD]
[TD]Time in
[/TD]
[TD]Time Out
[/TD]
[TD]Time In
[/TD]
[TD]Time Out
[/TD]
[TD]Time In
[/TD]
[TD]Time Out
[/TD]
[TD]Total Hrs
[/TD]
[TD]Reg Hrs
[/TD]
[TD]OT Hrs
[/TD]
[TD]Diff Hrs
[/TD]
[TD]Diff OT Hrs
[/TD]
[TD]Absent Hrs
[/TD]
[TD]Stat Hrs
[/TD]
[TD]Vac Hrs
[/TD]
[/TR]
[TR]
[TD]44
[/TD]
[TD]Nov 1
[/TD]
[TD]Days
[/TD]
[TD]6:00 am
[/TD]
[TD]12:45 pm
[/TD]
[TD]1:10 pm
[/TD]
[TD]8:00 pm
[/TD]
[TD][/TD]
[TD][/TD]
[TD]13:35
[/TD]
[TD]12
[/TD]
[TD]1.35
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]44
[/TD]
[TD]Nov 2
[/TD]
[TD]Nights
[/TD]
[TD]3:00 pm
[/TD]
[TD]8:45 pm
[/TD]
[TD]9:00 pm
[/TD]
[TD]2:30
am
[/TD]
[TD][/TD]
[TD][/TD]
[TD]11.25
[/TD]
[TD]11.25
[/TD]
[TD][/TD]
[TD]11.25
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
</d14,e14+1-d14,e14-d14))+if(or(g14="",h14=""),0,if(h14<g14,h14+1-g14,h14-g14))+if(or(j14="",k14=""),0,if(k14<j14,k14+1-j14,k14-j14)))>