英文:
How to calculate meal break start time in excel
问题
I am trying to calculate meal break start time based on shift length for the following sample data.
Business rules to calculate, "Where the shift length is > 6 hours, insert meal break start time in column F. Meal break start time must be 5 hours from the shift start time in column C."
I have applied below formula to derive the output;
=C27+TIME(5,0,0)
I am not sure if this is correct.
Could you pls suggest how to resolve this.
英文:
I am trying to calculate meal break start time based on shift length for the following sample data.
Business rules to calculate, "Where the shift length is > 6 hours, insert meal break start time in column F. Meal break start time must be 5 hours from the shift start time in column C"
I have applied below formula to derive the output;
=C27+TIME(5,0,0)
I am not sure if this is correct.
Could you pls suggest how to resolve this.
答案1
得分: 1
这看起来不错!现在你只需要检查一下轮班时长,以确保如果轮班不够长,则不显示用餐休息的开始时间。
=如果(E27>时间(6,0,0),C27+时间(5,0,0),"")
英文:
That looks good! Now you just need a check for the shift length, so it doesn't show a meal break start time if the shift isn't long enough.
=IF(E27>TIME(6,0,0), C27+TIME(5,0,0), "")
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论