is it possible

HappyChappy

Active Member
Joined
Jan 26, 2013
Messages
384
Office Version
  1. 2019
  2. 2010
  3. 2007
Platform
  1. Windows
Exel.xlsx
ABCDEFGHIJK
1JanuaryHours WorkedTotal HoursTotal Pay
2Sunday30/01/202200:0000:0000:000:00 
3Monday31/01/202210:0020:0010:009:15£92.50
4Tuesday01/02/202210:0020:0010:009:15£92.50
5Wednesday02/02/202210:0020:1510:159:30£95.00
6Thursday03/02/202210:0014:0004:004:00£80.00
7Friday04/02/202210:0020:0010:009:15£92.50
8Saturday05/02/202210:0016:0006:006:00£120.00
9
10
11RATES
12£10.00Standard RateMin 8 hrs paid as in G6 once 48 is reached Overtime kicks in to all paymnts
13£15.00O/Time Rate
14£12.00Saturday Rate
15£18.00Saturday O/Time Rate
16£15.00Sunday Rate
17£22.00Sunday O/Time Rate
18
Jan-22
Cell Formulas
RangeFormula
E2:E8E2=D2-C2
F2:F8F2=IF(E2>TIME(8,0,),E2-TIME(0,45,0),E2)
G2G2=IF(F2=0,"",MAX(Data!$B$44,F2*24)*$A$14)
G3:G7G3=IF(F3=0,"",MAX(Data!$B$44,F3*24)*$A$12)
G8G8=IF(F8=0,"",MAX(Data!$B$44,F8*24)*$A$16)
B3:B8B3=B2+1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:D3Cell Value>0textNO
D2:D3Cell Value>0textNO
D2:D3Cell Value>0textNO
D2:D3Cell Value>0textNO
D2:D3Cell Value>0textNO
D2:D3Cell Value>0textNO
C2:D10Cell Value>0textNO



Trying to work out how to build in hours work over 48 at overtime rate. The sheet can work out minimum hours works of 8hr also breaks of 45 mins need to be factored in once 8:45 is reached
i hope i have pasted the mini sheet correctly as it's my first attempt at this thank you
 
if i wanted to make the threshold 45 hours before overtime is applied which cell do i need to alter thanks
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Overtime.xlsx
Cell Formulas
RangeFormula
A2:A8A2=+B2
E2:E8E2=IF(COUNT(C2:D2)=2,D2-C2+(C2>D2),0)
F2:F8F2=MIN(MAX(0,E2-TIME(8,45,0)),TIME(0,45,0))
G2:G8G2=MAX(TIME(8,0,0),+E2-F2)*(E2>0)
H2:H8H2=MAX(0,MIN(G2,2-SUM($H$1:$H1)))
E9:I9,K9:N9E9=SUM(E2:E8)
J2:J8J2=IF(E2>0,IF(C2<D2,MAX(0,TIME(4,0,0)-C2)+MAX(0,D2-TIME(23,0,0)),MAX(0,MIN(TIME(4,0,0),D2)+1-MAX(TIME(23,0,0),C2))),0)
K2:K8K2=SUM(L2:N2)
L2:L8L2=24*$H2*VLOOKUP(WEEKDAY($B2,2),Tabel1,3,1)
M2:M8M2=24*$I2*VLOOKUP(WEEKDAY($B2,2),Tabel1,4,1)
N2:N8N2=J2*1*24
O2:P8O2=IFERROR(+L2/H2/24,"-")
B3:B8B3=B2+1
I2:I8I2=+G2-H2
I10I10=+I9+H9+F9
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:J9Expression=$E2<>$F2+$H2+$I2textNO
I10:J10,E9Expression=$E$9<>$I$10textNO
Cells with Data Validation
CellAllowCriteria
C2:D8Whole numberbetween 0 and 1
 
Upvote 0
Overtime.xlsx now with variable "48 hours"
Cell Formulas
RangeFormula
H1H1="normal " &TEXT(T7,"[uu]:mm")
A2:A8A2=+B2
F2:F8F2=MIN(MAX(0,E2-TIME(8,45,0)),TIME(0,45,0))
G2:G8G2=MAX(TIME(8,0,0),+E2-F2)*(E2>0)
H2:H8H2=MAX(0,MIN(G2,$T$7-SUM($H$1:$H1)))
I2:I8I2=+G2-H2
J2:J8J2=IF(E2>0,IF(C2<D2,MAX(0,TIME(4,0,0)-C2)+MAX(0,D2-TIME(23,0,0)),MAX(0,MIN(TIME(4,0,0),D2)+1-MAX(TIME(23,0,0),C2))),0)
K2:K8K2=SUM(L2:N2)
L2:L8L2=24*$H2*VLOOKUP(WEEKDAY($B2,2),Tabel1,3,1)
M2:M8M2=24*$I2*VLOOKUP(WEEKDAY($B2,2),Tabel1,4,1)
N2:N8N2=J2*1*24
O2:P8O2=IFERROR(+L2/H2/24,"-")
B3:B8B3=B2+1
E9:I9,K9:N9F9=SUM(F2:F8)
E2:E8E2=IF(COUNT(C2:D2)=2,D2-C2+(C2>D2),0)
E10E10=+I9+H9+F9
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:J9Expression=$E2<>$F2+$H2+$I2textNO
E9:E10Expression=$E$9<>$E$10textNO
Cells with Data Validation
CellAllowCriteria
C2:D8Whole numberbetween 0 and 1
T7Whole numberbetween 1,5 and 5
 
Upvote 0
You sir are a legend.. I'm out but will try it out in the morning once again thank you
 
Upvote 0
BSLAV i'm loving the spreadsheet but can I be cheeky and ask can we have it in the same format but with a months worth on the one sheet so I can have 12 sheets rather than 52 in my workbook.
Tried to just copy and paste the formula's but that doesn't work as expected.
 
Upvote 0
yes and no !
If you want to do so, do it immediately for a complete year or several years.
The big problem is at the beginning and end of every mounth, you cut a week in half.
A little bit like the ISO-weeksystem to calculate a weeknumber.
Your week starts on sunday,
- so if the sunday is in month x, the whole week is in month x
or
- if the sunday is in month x but the major part is in month x+1, then the week is in x+1
(here if the wednesday is in x+1)

So i advice you to do everything in 1 sheet.
 
Upvote 0
yes and no !
If you want to do so, do it immediately for a complete year or several years.
The big problem is at the beginning and end of every mounth, you cut a week in half.
A little bit like the ISO-weeksystem to calculate a weeknumber.
Your week starts on sunday,
- so if the sunday is in month x, the whole week is in month x
or
- if the sunday is in month x but the major part is in month x+1, then the week is in x+1
(here if the wednesday is in x+1)

So i advice you to do everything in 1 sheet.
I was thinking of a five week sheet which covers all 31 day months. Make is stand alone I cane start the month on the first Sunday and for example if I was paid the last Friday of the month say the 25th I would create another sheet and start that from the 27th and just keep repeating. This could then work for 4 weekly paid monthly paid etc. Does this make sense to you.
 
Upvote 0
i linked again an example file. Overtime.xlsx

Everything for more then a year, using "subtotal" to get subtotals between each week.
Remark : that weeknumber in column A isn't the american weeknumber and neither the ISO-weeknumber, consider it just a way to make a distinguish between weeks, that could have named better.

By using "subtotal", you loose a little bit of tools, like table (listobject) and pivottable, pity !
Instead in the upper left corner, now you have 3 numbers 123, to indicate the levels of that subtotal.
If you click on the "2", the dates collapse and you see only the weektotals. afterwards click again on "3"
It's your choice if you want those subtotals in between and loose the ability of tables and pivottables.

overtime.xlsx
ABCDEFGHIJKLMNOP
1weeknummerDatestartstoptotalbreaknettonormal 49:00overtimebonus23-4 Total Pay normal overtime2 bonus 23-4 check check3
221-52zondag 26/12/210:3023:3023:0000:4522:1522:15 04:00£ 337,75£ 333,75£ -£ 4,00£ 15,00 -
321-52maandag 27/12/215:0021:0016:0000:4515:1515:15  £ 152,50£ 152,50£ -£ -£ 10,00 -
421-52dinsdag 28/12/215:008:0003:00 08:0008:00  £ 80,00£ 80,00£ -£ -£ 10,00 -
521-52woensdag 29/12/215:0021:0016:0000:4515:1503:3011:45 £ 211,25£ 35,00£ 176,25£ -£ 10,00£ 15,00
621-52donderdag 30/12/215:0022:0017:0000:4516:15 16:15 £ 243,75£ -£ 243,75£ - - £ 15,00
721-52vrijdag 31/12/215:0021:0016:0000:4515:15 15:15 £ 228,75£ -£ 228,75£ - - £ 15,00
821-52zaterdag 01/01/225:0021:0016:0000:4515:15 15:15 £ 274,50£ -£ 274,50£ - - £ 18,00
9Totaal 21-52107:0004:30107:3049:0058:3004:00£ 1.528,50£ 601,25£ 923,25£ 4,00
1022-01zondag 02/01/220:3023:3023:0000:4522:1522:15 04:00£ 337,75£ 333,75£ -£ 4,00£ 15,00 -
1122-01maandag 03/01/225:0021:0016:0000:4515:1515:15  £ 152,50£ 152,50£ -£ -£ 10,00 -
1222-01dinsdag 04/01/225:008:0003:00 08:0008:00  £ 80,00£ 80,00£ -£ -£ 10,00 -
1322-01woensdag 05/01/225:0021:0016:0000:4515:1503:3011:45 £ 211,25£ 35,00£ 176,25£ -£ 10,00£ 15,00
1422-01donderdag 06/01/225:0022:0017:0000:4516:15 16:15 £ 243,75£ -£ 243,75£ - - £ 15,00
1522-01vrijdag 07/01/22      £ -£ -£ -£ - - -
1622-01zaterdag 08/01/22      £ -£ -£ -£ - - -
17Totaal 22-0175:0003:0077:0049:0028:0004:00£ 1.025,25£ 601,25£ 420,00£ 4,00
1822-02zondag 09/01/22      £ -£ -£ -£ - - -
Blad1
Cell Formulas
RangeFormula
A18,A10:A16,A2:A8A2=MOD(YEAR(Blad1!$B2-WEEKDAY(Blad1!$B2)+4),100) & "-" & TEXT(ISOWEEKNUM(Blad1!$B2+1),"00")
E2:E8,E18,E10:E16E2=IF(COUNT(C2:D2)=2,D2-C2+(C2>D2),0)
F2:F8,F18,F10:F16F2=MIN(MAX(0,E2-TIME(8,45,0)),TIME(0,45,0))
G2:G8,G18,G10:G16G2=MAX(TIME(8,0,0),+E2-F2)*(E2>0)
H2:H8,H11:H16H2=MAX(0,MIN(G2,$T$7-SUMIF($A$1:A1,A2,$H$1:$H1)))
I2:I8,I18,I10:I16I2=+G2-H2
J2:J8,J18,J10:J16J2=IF(E2>0,IF(C2<D2,MAX(0,TIME(4,0,0)-C2)+MAX(0,D2-TIME(23,0,0)),MAX(0,MIN(TIME(4,0,0),D2)+1-MAX(TIME(23,0,0),C2))),0)
K2:K8,K18,K10:K16K2=SUM(L2:N2)
L2:L8,L18,L10:L16L2=24*$H2*VLOOKUP(WEEKDAY($B2,2),Tabel1,3,1)
M2:M8,M18,M10:M16M2=24*$I2*VLOOKUP(WEEKDAY($B2,2),Tabel1,4,1)
N2:N8,N18,N10:N16N2=J2*1*24
O2:P8,O18:P18,O10:P16O2=IFERROR(+L2/H2/24,"-")
B3:B8,B11:B16B3=B2+1
E9:N9,E17:N17E9=SUBTOTAL(9,E2:E8)
B10,B18B10=B8+1
H10,H18H10=MAX(0,MIN(G10,$T$7-SUMIF($A$1:A8,A10,$H$1:$H8)))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:P850Expression=ISGETAL(VIND.SPEC("tota";$A2))textNO
E2:J850Expression=$E2<>$F2+$H2+$I2textNO
Cells with Data Validation
CellAllowCriteria
C2:D8Whole numberbetween 0 and 1
C10:D16Whole numberbetween 0 and 1
C18:D18Whole numberbetween 0 and 1
 
Upvote 0
that's always the discussion between great functionality and great layout.
Your great layout works okay, but in 6 months, you forget something and a day or a week is not counted or double counted.
See the same link again (i think it's always the same linkaddress, so you get the latest version).
The data (discussion with/without subtotals) in 1 sheet.
A pivottable with one or more slicers on a 2nd sheet.
Remember, a pivottable has to be refreshed (manually or with VBA).

If you click in the slicer of the weeknumbers on a certain week, you get all the info about that week (is not completed yet !!). If you click on another weeknumber, you get that one, very easy, very handy.
If you use the SHIFT or the CTRL together with the mouse, you can even select several weeks contiguous or not.
Overtime.xlsx
 
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,227
Members
453,025
Latest member
Hannah_Pham93

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