Issues with Shift Differential/OT Formulas (table included)

azepeda88

New Member
Joined
Mar 16, 2018
Messages
3
ABCDEFGH
1nameStart timeEnd TimeActual HrsStraightShift DiffOTShift Diff OT
202/24/2018 06:1002/24/18 18:401212.7
302/25/2018 06:1002/25/18 18:401212.7
403/02/2018 06:1003/02/18 18:401212.7
503/03/2018 06:1003/03/18 18:401212.7
648402.8

<tbody>
</tbody>


OK, having issues with formula or trying to figure out how to automate with formulas, the table above is what i have working so far. I've been working on this for a week and cant figure out formulas that need to use. Thank you in advance.

- E5 needs to change to automatically not go over 40 hrs and the remainder need to go into G5
ex. if 12 is imputed in E5 it should auto change to 4 and put the remaining 8 to G5 as OT
- when OT is incurred as in E5 the shift diff in F5 needs to be placed into H5 instead to be payed as Shift Diff OT
- shift diff will be imputed manually in F2-F5
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I think this is what you're looking for:

Code for Cell D2:


=IF((C2-B2)>40,40,C2-B2)


Code for Cell D3:
=IF(C3-B3+SUM($D$2:D2)>40,40-SUM($D$2:D2),C3-B3))


Drag the code down through all of the part of column D that you'll be using.


Code for G2:


=IF(C2-B2=D2,0,C2-B2-D2)


Drag the code down through all of the parts of column G that you'll be using.


Code for H2:


=IF(G2=0, "", F2)


Drag the code down through all of the parts of H that you need it.


Hopefully that's what you need, or will at least get you closer to what you need.
 
Upvote 0
I think this is what you're looking for:

Code for Cell D2:


=IF((C2-B2)>40,40,C2-B2)


Code for Cell D3:
=IF(C3-B3+SUM($D$2:D2)>40,40-SUM($D$2:D2),C3-B3))


Drag the code down through all of the part of column D that you'll be using.


Code for G2:


=IF(C2-B2=D2,0,C2-B2-D2)


Drag the code down through all of the parts of column G that you'll be using.


Code for H2:


=IF(G2=0, "", F2)


Drag the code down through all of the parts of H that you need it.


Hopefully that's what you need, or will at least get you closer to what you need.

Can you modify this for overnight (6m-6m) using military time with decimals (11:45pm=23.75)?
 
Upvote 0
I think this is what you're looking for:

Code for Cell D2:


=IF((C2-B2)>40,40,C2-B2)


Code for Cell D3:
=IF(C3-B3+SUM($D$2:D2)>40,40-SUM($D$2:D2),C3-B3))


Drag the code down through all of the part of column D that you'll be using.


Code for G2:


=IF(C2-B2=D2,0,C2-B2-D2)


Drag the code down through all of the parts of column G that you'll be using.


Code for H2:


=IF(G2=0, "", F2)


Drag the code down through all of the parts of H that you need it.


Hopefully that's what you need, or will at least get you closer to what you need.

Can you modify this for overnight (6pm-6am) using military time with decimals (11:45pm=23.75)?
 
Upvote 0

Forum statistics

Threads
1,214,617
Messages
6,120,541
Members
448,970
Latest member
kennimack

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