lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I want to write a formula to calculate overtime. If the total hrs worked is more than 8 then that is overtime
I thought abut this formula but did not work. It only work if the difference is 1hrs and above. if it is 1/2hr then I get garbage number.
= max(A1-8,0)
[TABLE="class: grid, width: 199"]
<tbody>[TR]
[TD]total hrs worked[/TD]
[TD]overtime[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]1.59872E-14[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]6[/TD]
[/TR]
</tbody>[/TABLE]
Any other formula will be ok as well. thank you so much.
I want to write a formula to calculate overtime. If the total hrs worked is more than 8 then that is overtime
I thought abut this formula but did not work. It only work if the difference is 1hrs and above. if it is 1/2hr then I get garbage number.
= max(A1-8,0)
[TABLE="class: grid, width: 199"]
<tbody>[TR]
[TD]total hrs worked[/TD]
[TD]overtime[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]1.59872E-14[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]6[/TD]
[/TR]
</tbody>[/TABLE]
Any other formula will be ok as well. thank you so much.
Last edited: