Meucci98

New Member
Joined
Jan 12, 2015
Messages
18
Hi, I am developing a time sheet and need help with the formulas for ST, OT & DT columns.

NameStartFinishBreaksSTOTDT
John Doe7:0023:001:00825

<tbody>
</tbody>
In the course of a day:

  • the first 8 hours are at ST (straight time)
  • the next 2 hours after 8 are at OT (over time)
  • any hours after 10 hours are at DT (double time)

In the above example I need:

  • ST to show 8 hrs
  • OT to show 2 hrs
  • DT to show 5 hrs

Thank you in advance for any help.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Perhaps something like this:

ST formula = =MIN((C2-B2-D2),TIME(8,0,0))
OT formula = =IF((C2-B2-D2)>=TIME(10,0,0),TIME(2,0,0),(C2-B2-D2)-TIME(8,0,0))
DT formula = =MAX((C2-B2-D2)-TIME(10,0,0),0)

C2 is Finish time
B2 is Start time
D2 is Breaks
 
Upvote 0
  • the first 8 hours are at ST (straight time)
  • the next 2 hours after 8 are at OT (over time)
  • any hours after 10 hours are at DT (double time)
Give this a try...

E2: =MIN(8,24*(C2-B2-D2))

F2: =MAX(0,MIN(2,MIN(10,24*(C2-B2-D2)-8)))

G2: =MAX(0,24*(C2-B2-D2)-E2-F2)''

Note: You will probably have to manually change the cell's formats to General as I think Excel will try to help by making them Time (or Date) formats once you place the formulas in the cells.
 
Last edited:
Upvote 0
Hello,

The logic for your problem should be the following.

ST = If(Finish-Start-Break>8,8,Finish-Start-Break)
OT = If(ST=8,If(Finish-Start-Break>10,2,Finish-Start-Break-8),0)
DT = If(DT=2,Finish-Start-Break-10,0)

You only need to replace Finish, Start and Break by the good cells.
 
Upvote 0
Hello,

The logic for your problem should be the following.

ST = If(Finish-Start-Break>8,8,Finish-Start-Break)
OT = If(ST=8,If(Finish-Start-Break>10,2,Finish-Start-Break-8),0)
DT = If(DT=2,Finish-Start-Break-10,0)

You only need to replace Finish, Start and Break by the good cells.


Thank you very much, this works great
 
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,946
Members
449,480
Latest member
yesitisasport

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