Forum Discussion
Maya Bereaux
Jul 27, 2018Copper Contributor
Calculating Hours Worked for the Week Including Absences
I am helping someone with their compiled time sheet for their employees and would like to know how do you add the hours each worker worked for the week while also including absences in the time sheet...
- Jul 27, 2018Greetings! Just add a small modification to the work you have already done, =iferror(b4-a4,0) Attaching file for your reference. Thanks,
Haytham Amairah
Jul 27, 2018Silver Contributor
Hi Maya,
Please update the formula in cell P8 as follow:
=IF(OR(O8="ABSENT",N8="ABSENT"),"0",IF(O8<N8,O8+1,O8)-N8)
The idea of this update is to check whether cell O8 or cell N8 contains ABSENT.
If so, the formula will return 0, otherwise, it will go ahead to apply this calculation:
IF(O8<N8,O8+1,O8)-N8)
Regards
Maya Bereaux
Jul 31, 2018Copper Contributor
Thanks a lot! Taking note of the formula for future use. Will do some more reading up on the OR function as well