I'm trying to calculate overtime and working time based on the start time and stop time given.
The criteria are:
Valid working time is between 07:00 and 17:00 all other time outside this slot is overtime. to calculate the time is not the issue, it is when somene starts or stops the time outside this slot.
eg. from 18:00 to 06:00 gives me negative number and I'm stuck.
the formula gets to big and I'm getting stuck on this, maybe there is a simpeler way...
=IF(OR(E14>'Data lists'!$J$1;F14>'Data lists'!$J$2);F14-E14;IF(OR(E14="";E14>'Data lists'!$J$1);0;('Data lists'!$J$1-E14))+IF(OR(F14="";F14<'Data lists'!$J$2);0;(F14-'Data lists'!$J$2)))
E F G H I
<colgroup><col><col span="4"></colgroup><tbody>
</tbody>
The criteria are:
Valid working time is between 07:00 and 17:00 all other time outside this slot is overtime. to calculate the time is not the issue, it is when somene starts or stops the time outside this slot.
eg. from 18:00 to 06:00 gives me negative number and I'm stuck.
the formula gets to big and I'm getting stuck on this, maybe there is a simpeler way...
=IF(OR(E14>'Data lists'!$J$1;F14>'Data lists'!$J$2);F14-E14;IF(OR(E14="";E14>'Data lists'!$J$1);0;('Data lists'!$J$1-E14))+IF(OR(F14="";F14<'Data lists'!$J$2);0;(F14-'Data lists'!$J$2)))
E F G H I
Start time site | Stop time site | Total Working time | Total Regular Working time | Total Overtime |
7:00 | 17:00 | 10:00 | 10:00 | 0:00 |
6:00 | 12:00 | 6:00 | 5:00 | 1:00 |
9:00 | 18:00 | 9:00 | 0:00 | 9:00 |
15:00 | 18:00 | 3:00 | 0:00 | 3:00 |
18:00 | 20:00 | 2:00 | 0:00 | 2:00 |
18:00 | 6:00 | ######## | 0:00 | ######## |
0:00 | 0:00 | 0:00 |
<colgroup><col><col span="4"></colgroup><tbody>
</tbody>