# Formula for OT/DT hours worked

#### dorothy0831

##### New Member
Our company was part of the cyber attack on Kronos private cloud. I need to create formulas to arrive at overtime and double time for employees who work 5days 8hrs or 4days 10hrs. I can create formulas for relatively easy if and statements but I'm struggling with this.

If the shift shows 5days8hrs and the employee worked 10.2 hours I need a formula to display overtime over 8hrs in a day as (2hrs) and double time over 10 hrs in a day as (.2 hrs), however if the shift says 4days10hours and the employee worked 12.5 hours I need a formula to display overtime over 10 hrs in a day as (2.0 hrs) and double time for hours over 12 in a day as (.5 hrs).

This is what I have for OT but not correct because I want it to stop at 10 and have the remaining .2hrs to show in DT column.
=IF(AND(E6>=8,E6<=12),E6-8,0)

### Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Update: I've been playing around and have gotten the 5days8hr shift to work but now I need to know if I can put an or in the formula to get it to say if 4days10hr to perform a different scenario. Can I put an or with this formula?

Replies
5
Views
220
Replies
3
Views
194
Replies
18
Views
518
Replies
4
Views
245
Replies
1
Views
266

1,203,027
Messages
6,053,120
Members
444,640
Latest member
Dramonzo

### 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.

### Which adblocker are you using?

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

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