Overtime hours against Basic hours

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,540
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Could I please ask for some assistance please
I have the following formula which checks the hours worked in S11 and displays any hours over 7.5 (Mon-Thu) or 7.0 (Fri)

=IF(S11="","",MAX(0,IF(WEEKDAY(D11)=6,S11-7,S11-7.5)))

Now this works for weekday but if some time is worked on weekends i currently don't have a calculation

Can this be added to the formula to include weekends

Many thanks
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
how do you want it to calculate for weekend days?
 
Upvote 0
any hours from saturday and sunday to be displayed
maybe go with 7 hours each

thanks
 
Upvote 0
Excel Formula:
=IF(S11="","",MAX(0,IF(WEEKDAY(D11)={6,7,1},S11-7,S11-7.5)))
 
Upvote 0
The weekday function return the day of the week. You have = 6, so that's friday because you did not explicitely say the week starts on Monday. Turn into
Excel Formula:
weekday(date, 2)>=5
would do the trick I guess.
 
Upvote 0
Hi,

Many thanks for your help but this returns a zero

I have my total hours in cell m23 and if this is >37 then i would need a calculation of hours above the following

Mon 7.5hrs
Tues 7.5hrs
Wed 7.5hrs
Thur 7.5hrs
Fri 7.0 hrs
Sat Overtime
Sun Overtime

Hoping theres a better formula to calculate

Many thanks
 
Upvote 0
can you share some sample data so we can see what you're working with?
 
Upvote 0
Hi,

HRGO Calculator.xlsx
ABCDEFGHIJKLMNOPQRSTUV
7Week 4
8Timesheet Entries
9
10DateJobStartFinishHoursJobBasicOvertimeTotalPurchase OrderBasicValueOvertimeValue
1123/01/2023397118.0016.007.50397117.500.00151.582317537.50151.580.00
1224/01/2023396428.0016.007.503964229.500.50609.222317577.50151.580.00
1325/01/2023396428.0016.007.50333334.000.0080.847.50151.580.00
1426/01/2023396428.0016.508.00    8.00161.680.50
1527/01/2023396428.0015.507.00    7.00141.470.00
1628/01/2023333338.0012.004.00    4.0080.840.00
17     0.000.000.00
18     0.000.000.00
19     0.000.000.00
20     0.000.000.00
21     0.000.000.00
22
2341.5041.000.50841.64
24
Nickolas Marques
Cell Formulas
RangeFormula
L11L11=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L11))),"")
M11M11=IF(L11="","",SUMIFS(X11:X21,E11:E21,L11))
N11:N21N11=IF(L11="","",SUMIFS(U11:U21,E11:E21,L11))
O11O11=IF(L11="","",SUMIFS(AC11:AC21,E11:E21,L11))
L12L12=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L12))),"")
M12M12=IF(L12="","",SUMIFS(X11:X21,E11:E21,L12))
O12O12=IF(L12="","",SUMIFS(AC11:AC21,E11:E21,L12))
L13L13=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L13))),"")
M13M13=IF(L13="","",SUMIFS(X11:X21,E11:E21,L13))
O13O13=IF(L13="","",SUMIFS(AC11:AC21,E11:E21,L13))
L14L14=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L14))),"")
M14M14=IF(L14="","",SUMIFS(X11:X21,E11:E21,L14))
O14O14=IF(L14="","",SUMIFS(AC11:AC21,E11:E21,L14))
L15L15=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L15))),"")
M15M15=IF(L15="","",SUMIFS(X11:X21,E11:E21,L15))
O15O15=IF(L15="","",SUMIFS(AC11:AC21,E11:E21,L15))
L16L16=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L16))),"")
M16M16=IF(L16="","",SUMIFS(X11:X21,E11:E21,L16))
O16O16=IF(L16="","",SUMIFS(AC11:AC21,E11:E21,L16))
L17L17=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L17))),"")
M17M17=IF(L17="","",SUMIFS(X11:X21,E11:E21,L17))
O17O17=IF(L17="","",SUMIFS(AC11:AC21,E11:E21,L17))
L18L18=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L18))),"")
M18M18=IF(L18="","",SUMIFS(X11:X21,E11:E21,L18))
O18O18=IF(L18="","",SUMIFS(AC11:AC21,E11:E21,L18))
L19L19=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L19))),"")
M19M19=IF(L19="","",SUMIFS(X11:X21,E11:E21,L19))
O19O19=IF(L19="","",SUMIFS(AC11:AC21,E11:E21,L19))
L20L20=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L20))),"")
M20M20=IF(L20="","",SUMIFS(X11:X21,E11:E21,L20))
O20O20=IF(L20="","",SUMIFS(AC11:AC21,E11:E21,L20))
L21L21=IFERROR(INDEX(E11:E21,SMALL(IF(FREQUENCY(IF(E11:E21<>"",MATCH("~"&E11:E21,E11:E21&"",0)),ROW(E11:E21)-ROW(E11)+1),ROW(E11:E21)-ROW(E11)+1),ROWS(L11:L21))),"")
M21M21=IF(L21="","",SUMIFS(X11:X21,E11:E21,L21))
O21O21=IF(L21="","",SUMIFS(AC11:AC21,E11:E21,L21))
S11:S21S11=IF(AND(F11<$Y$2,G11>$Y$3),(G11-F11)-($Y$3-$Y$2),(G11-F11))
T11:T21T11=SUM($H$3*S11)
U11:U21U11=IF(S11="","",MAX(0,IF(WEEKDAY(D11,2),S11-7.5,S11-7)))
H11:H21H11=IF(E11="","",AD11)
H23,M23:O23H23=SUM(H11:H21)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,752
Members
448,989
Latest member
mariah3

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