Timesheet maker

Lionround

New Member
Joined
Jun 1, 2011
Messages
15
Excel 2007

I am trying to make a timesheet for our office on which you can enter your time on a daily basis. My problem is that my formula returns the number of hours worked (that sounds like a good problem to most of you); however, if it more than 8 hours, I need it to return 8 in the hours worked column and the remainder in the OT hours column.

My formula thus far in cell E13:

=IF(ISERROR((IF(AND(C13<>0,D13<>0),IF(D13<C13,D13+1-C13,D13-C13),""))*24-0.5),"0",((IF(AND(C13<>0,D13<>0),IF(D13<C13,D13+1-C13,D13-C13),""))*24-0.5))



IF C13 is 8:30 am. D13 is 5:00 pm. I get 8 hours.
IF C13 is 8:30 am. D13 is 7:00 pm. I get 10 hours.

I need to display 8 and add that to the weekly total for regular hours. I need the "extra" 2 hours to be in another cell - in this instance I13.
I know how to get the 2 hours into I-13 (=SUMI13-E13), but I don't know how to get the E13 to display and add the 8.

BTW, the -.05 takes off for lunch without having to "log out and log in".

Hope that makes sense. It is my first post.
 
Last edited:
For overtime hours, I am getting a #VALUE error if there is nothing there. That may be because I added a -.5 to take off for lunch. Otherwise, if they work 8:30 am to 5:00 pm it shows 8 reg hours and .5 OT. It should show 8 reg and 0 OT.
In other words, the clocked time will be 8.5 hours but the actuall work time will only be 8?

OK, try this...

Reg Hrs:

=IF(COUNT(A2:B2)<2,"",MIN(8.5,MOD(B2-A2,1)*24)-0.5)

OT Hrs:

=IF(COUNT(A2:B2)<2,"",MAX(0,MOD(B2-A2,1)*24-8.5))
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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