canselmi
03-19-2008, 08:21 PM
This is going to be difficult to explain. Here goes. I have a summary sheet with accumulated time for the week. For simplicity I'm using A1:A4 for this example:
Cell A1 = Hours worked (hh:mm)
Cell A2 = Paid time off (hh:mm)
Cell A3 = Total Regular Time (hh:mm)
Cell A4 = Total Overtime hours (hh:mm)
Here's the issue. Only "Worked" hours over 40 hours is considered Overtime, unless there's paid time off. An employee could actually have a total of 44 hours, but took 4 hours of Paid time off. So all 44 hours would be paid at regular time. Another example would be an employee worked 45 hours, but 4 hours were taken as paid time off, so:
Cell A3 (Regular Time) should equal 44 hours (but shown in minutes)
Cell A4 (Overtime) should equal 1 hour (but shown in minutes)
I don't think a formula will can do what I need and would like to see if vba can do it.
Cell A1 = Hours worked (hh:mm)
Cell A2 = Paid time off (hh:mm)
Cell A3 = Total Regular Time (hh:mm)
Cell A4 = Total Overtime hours (hh:mm)
Here's the issue. Only "Worked" hours over 40 hours is considered Overtime, unless there's paid time off. An employee could actually have a total of 44 hours, but took 4 hours of Paid time off. So all 44 hours would be paid at regular time. Another example would be an employee worked 45 hours, but 4 hours were taken as paid time off, so:
Cell A3 (Regular Time) should equal 44 hours (but shown in minutes)
Cell A4 (Overtime) should equal 1 hour (but shown in minutes)
I don't think a formula will can do what I need and would like to see if vba can do it.