简体   繁体   English

电子表格中的Excel公式可计算工作时间

[英]Excel formula within spreadsheet to calculate hours worked

I have been struggling for some time to find formula for a spreadsheet I am trying to manage / create relating to working times. 我一直在努力寻找要尝试管理/创建的与工作时间相关的电子表格的公式。

Column B contains the start time. B列包含开始时间。
Column C contains finish time. C列包含完成时间。

When you work beyond 7pm in the evening the hours that follow are noted and required to be counted as irregular hours. 当您晚上晚上7点以后工作时,会记录以下时间,并且这些时间必须算作非正常时间。

This would be calculated and shown in column E. 这将被计算并显​​示在E列中。

I would like assistance in how to calculate and find a formula for this function. 我想要有关如何计算和查找此函数公式的帮助。

Within this spreadsheet I have hours worked in column D and I would like also a calculation to show when employee works more than 7 hours (column E). 在此电子表格中,我在D列中工作了几个小时,并且我还希望通过计算来显示员工何时工作超过7个小时(E列)。

If your values in cells formatted as time -hh:mm- : 如果单元格中的值格式为时间-hh:mm-:

In column E : E栏中:
(You need to calculate times after 7:00pm -In Row 2-) (您需要在7:00 pm之后计算时间-在第2行中)

=IF(C2>TIME(19;0;0);C2-TIME(19;0;0); 0)

In column D : D栏中:
(You need to calculate time between start and finish) (您需要计算开始和结束之间的时间)

=B2-C2

If your cells formatted to text : 如果您的单元格格式化为文本:
Use a conversion by TimeValue() function. 使用通过TimeValue()函数进行的转换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM