Maybe you could make a UDF? I always make UDFs when formulas become complex.
Just change the vHours to the total hours worked and vPayRate to hourly wages. If necessary more variable could be added to determine the cutoff for overtime and double time, but I assumed time up to 8 hours as standard, between 8 and 16 as overtime, and over 16 as doubletime.
Function OT(vHours As Double, vPayRate)
Dim A1, A2, A3 As Double
Select Case vHours
Case Is <= 8 'This case is for when total hours is less than 8
A1 = vPayRate * vHours
Case 8 To 16 'This case is for when total hours is between 8 and 16
A1 = vPayRate * 8
A2 = vPayRate * 1.5 * (vHours - 8)
Case Is > 16 'This case is for when total hours is more than 16
A1 = vPayRate * 8 'This is pay rate times 8 hours
A2 = vPayRate * 1.5 * 8 'This is for paying over time at 1.5 times normal pay for 8 hours
A3 = vPayRate * 2 * (vHours - 16) 'This is paying double time for hours over 16
End Select
OT = A1 + A2 + A3
End Function
Bookmarks