Differential based on percentage of hourly rate between set range hours

DamnBrecklyn

New Member
Joined
Apr 22, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
Please point me in the right direction. I'm trying to factor in differential pay for hours between 10pm - 6am.
Differential =10% hourly wage. Example employee makes $10 an hour so differential would equal $1 totaling $11/hr for any hours worked between 10pm - 6p

What formula designate between 10-6 the employee get paid hourly + differential

xxTimesheet1.xlsx
ABCDEFGHI
4date10/10/21
5
6Wage$14.75
7OT Wage$22.13
8
9DayDateTime inTime OutTime InTime OutOT InOT OutTotal
10Sunday10-Oct-216:00 AM11:00 AM12:00 PM3:00 PM10:00 PM12:00 AM10.00
11Monday11-Oct-213:00 AM8:00 AM9:00 AM12:00 PM8:00 PM10:00 PM10.00
12Tuesday12-Oct-211:00 AM5:00 AM6:00 AM10:00 AM8.00
13Wednesday13-Oct-219:00 PM1:00 AM2:00 AM6:00 AM8.00
14Thursday14-Oct-219:00 PM1:00 AM2:00 AM6:00 AM10:00 PM11:00 PM9.00
15Friday15-Oct-216:00 PM9:00 PM3.00
16Saturday16-Oct-210.00
TimeSheet
Cell Formulas
RangeFormula
B7B7=B6*1.5
B10B10=G4
B11:B16B11=B10+1
I10:I16I10=(MOD(D10-C10,1)+MOD(F10-E10,1)+MOD(H10-G10,1))*24
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try the formula in J2 and copy down
Excel Formula:
=24*MMULT((MOD(F10-C10,1)-MOD(E10-D10,1))*{1,0}+{-1,1}*(MMULT((MOD(H10-G10,1)>MOD(C10:D10-G10,1))*MOD(D10-G10:H10,1),{1;-1})+MMULT((MOD(H10-G10,1)>MOD(E10:F10-G10,1))*MOD(F10-G10:H10,1),{1;-1})+MOD(H10-G10,1)*((MOD(C10-G10,1)>MOD(D10-G10,1))+(MOD(E10-G10,1)>MOD(F10-G10,1)))),$B$6:$B$7)
 
Upvote 0
Try the formula in J2 and copy down
Excel Formula:
=24*MMULT((MOD(F10-C10,1)-MOD(E10-D10,1))*{1,0}+{-1,1}*(MMULT((MOD(H10-G10,1)>MOD(C10:D10-G10,1))*MOD(D10-G10:H10,1),{1;-1})+MMULT((MOD(H10-G10,1)>MOD(E10:F10-G10,1))*MOD(F10-G10:H10,1),{1;-1})+MOD(H10-G10,1)*((MOD(C10-G10,1)>MOD(D10-G10,1))+(MOD(E10-G10,1)>MOD(F10-G10,1)))),$B$6:$B$7)
Did not work :/
Going to add additional information to clarify
 
Upvote 0
Differential (diff) = hourly*.1 or 10% of base pay
overtime (OT) pay is applied once employee hits 40hrs
diff can be applied to OT hours however it would always be 10% of base pay rate
diff time range = 10:00 pm - 6:00 am any day of the week


EX. An employee makes $10/hr base pay. With the diff they make $11/hr total

shift 5 am - 9 am they would make $11 for the first hour then $10/hr for the rest of that shift == 11+10+10+10= $41

below is updated sheet for two employees.

xxTimesheet1.xlsx
ABCDEFGHI
3
4date10/10/21
5
6Wage$14.75
7OT Wage$22.13
8
9DayDateTime inTime OutTime InTime OutOT InOT OutTotal
10Sunday10/106:0011:0012:0015:0022:000:0010.00
11Monday10/113:008:009:0012:0020:0022:0010.00
12Tuesday10/121:005:006:0010:008.00
13Wednesday10/1321:001:002:006:008.00
14Thursday10/1421:001:002:006:0022:0023:009.00
15Friday10/1518:0021:003.00
16Saturday10/160.00
17
18Total Hours48.00
19
20Gross Pay$767.00
21
22
23date10/10/21
24
25Wage$17.00
26OT Wage$25.50
27
28DayDateTime inTime OutTime InTime OutOT InOT OutTotal
29Sunday10/109:00 PM11:00 PM12:00 PM3:00 PM10:00 PM12:00 AM7.00
30Monday10/113:00 AM8:00 AM9:00 AM12:00 PM8:00 PM10:00 PM10.00
31Tuesday10/121:00 AM5:00 AM6:00 AM10:00 AM8.00
32Wednesday10/139:00 PM1:00 AM2:00 AM6:00 AM8.00
33Thursday10/140.00
34Friday10/153:00 AM4:00 AM4:00 AM6:00 AM3.00
35Saturday10/160.00
36
37Total Hours36.00
38
39Gross Pay$612.00
TimeSheet
Cell Formulas
RangeFormula
B7,B26B7=B6*1.5
B10,B29B10=G4
B11:B16,B30:B35B11=B10+1
I10:I16,I29:I35I10=(MOD(D10-C10,1)+MOD(F10-E10,1)+MOD(H10-G10,1))*24
I18,I37I18=SUM(I10:I16)
I20I20=Sheet1!H9
I39I39=Sheet1!H12


xxTimesheet1.xlsx
ABCDEFGH
4OT Rate
51.5
6
7
8Total HoursRegular HoursOT HoursRateRegular GpayOT GpayTotal Gross
94840814.75590177767
10
11Total HoursRegular HoursOT HoursRateRegular GpayOT GpayTotal Gross
1236.00360176120612
Sheet1
Cell Formulas
RangeFormula
B9B9=TimeSheet!I18
C9,C12C9=IF([@Column2]>40,40,[@Column2])
D9,D12D9=[@Column2]-[@Column3]
E9E9=TimeSheet!B6
F9,F12F9=ROUND([@Column3]*[@Column5],2)
G9,G12G9=ROUND([@Column5]*$A$5*[@Column4],2)
H9,H12H9=SUM([@Column6]+[@Column7])
B12B12=TimeSheet!I37
E12E12=TimeSheet!B25
 
Upvote 0
Hi,
In your screenshot, for case 2 then Total hours is 36 (OT=0) but there are two days (sun & fri) the employee worked in range 10pm - 6pm, so will the employee getpaid differential for that?
 
Upvote 0
Yes, the differential can be paid any day of the week. Overtime is any shift outside of what the employee is scheduled for regularly however they only get overtime pay once they've hit 40 hours for the working week. Working week starts Sunday and ends Saturday.
 
Upvote 0
But you havent calculated differential for case 2 in your example. Can you explain why?
 
Upvote 0
And differential for case 1 on Thursday
I haven't calculated for differential at all. That is what formula I need. There's no labeled cell because I couldn't figure out how even to pull the data.
 
Upvote 0
Formula for Differential is as below
Excel Formula:
=10%*B6*24*SUMPRODUCT(MMULT((MOD("6:00"-"22:00",1)>MOD(C10:D16-"22:00",1))*MOD("6:00"-C10:D16,1)+(MOD("6:00"-"22:00",1)>MOD(E10:F16-"22:00",1))*MOD("6:00"-E10:F16,1)+(MOD("6:00"-"22:00",1)>MOD(G10:H16-"22:00",1))*MOD("6:00"-G10:H16,1),{1;-1})+MOD("6:00"-"22:00",1)*((MOD(C10:C16-"22:00",1)>MOD(D10:D16-"22:00",1))+(MOD(E10:E16-"22:00",1)>MOD(F10:F16-"22:00",1))+(MOD(G10:G16-"22:00",1)>MOD(H10:H16-"22:00",1))))
 
Upvote 0
Solution

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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