Timesheet: calculating total, regular, ot and pto hours

hirick12

New Member
Joined
Jun 2, 2017
Messages
11
Hi,
We use Excel for our timesheet. The formulas work well, except for the PTO (Paid Time Off). We can't get it to add to total hours without adding to regular.

Here are the forumulas:

Total Hours: =ROUND(IF((OR(B16="",C16="")),0,IF((C16< b16),((c16-b16)*24)+24,(c16-b16)*24))+if((or(e16="",f16="")),0,if((f16< e16),((f16-e16)*24)+24,(f16-e16)*24)),2)
Reg Hours: =IF(G16>=8,8,G16)
OT Hours: =IF(((C16-B16)+(F16-E16))*24>8,((C16-B16)+(F16-E16))*24-8,0)

our headers look like this:


DateTime
In
Time
Out
Time
In
Time
Out
Total
Hrs
Reg HrsOTPTO

<tbody>
</tbody>


Goals:
total hours equal reg hrs, ot and pto
reg hours never exceed 8 hours
reg hours do not include pto
entering the time adds to total and reg hours
ot is auto populated when entering time.

Any suggestions?

Rick
 
Last edited by a moderator:

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
For Reg Hrs try
=IF(G16-J16>=8,8,G16-J16)
 
Upvote 0
Add the PTO to Total Hrs, then it will work
 
Upvote 0
If you subtract the pto from the total, then regular should be correct.
Can you supply some sample data & the full formulae you are using.
 
Upvote 0
Total Hours: =ROUND(IF((OR(B16="",C16="")),0,IF((C16< b16),((c16-b16)*24)+24,(c16-b16)*24))+if((or(e16="",f16="")),0,if((f16< e16),((f16-e16)*24)+24,(f16-e16)*24)),2)
Reg Hours: =IF(G16>=8,8,G16)
OT Hours: =IF(((C16-B16)+(F16-E16))*24>8,((C16-B16)+(F16-E16))*24-8,0)

Column
B: Time In
C: Time Out
E: Time In
F: Time Out
G: Total Hours
H: Reg Hrs
I: OT
J: PTO

Rick

<tbody>
</tbody>
 
Upvote 0
ok, we can close this thread. I trashed all my updates and started over and found the foible.

By switching the calculation for Reg Hrs from Total hrs to its' own calculation of the time in/time out, it allowed the pto to be added to Total hrs without affecting Reg Hrs.

Thanks for everyone's help!

Rick
 
Upvote 0
Glad you sorted it & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

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