以下的公式怎么理解?=IF(OR(F2="",G2=""),0,HOUR(TIME(LEFT(G2,2),RIGHT(G2,2),0)-TIME(LEFT(F2,2),RIGHT(F2,2),0))+MINUTE(TIME(LEFT(G2,2),RIGHT(G2,2),0)-TIME(LEFT(F2,2),RIGHT(F2,2),0))/60)

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/15 12:03:13
以下的公式怎么理解?=IF(OR(F2="",G2=""),0,HOUR(TIME(LEFT(G2,2),RIGHT(G2,2),0)-TIME(LEFT(F2

以下的公式怎么理解?=IF(OR(F2="",G2=""),0,HOUR(TIME(LEFT(G2,2),RIGHT(G2,2),0)-TIME(LEFT(F2,2),RIGHT(F2,2),0))+MINUTE(TIME(LEFT(G2,2),RIGHT(G2,2),0)-TIME(LEFT(F2,2),RIGHT(F2,2),0))/60)
以下的公式怎么理解?

=IF(OR(F2="",G2=""),0,HOUR(TIME(LEFT(G2,2),RIGHT(G2,2),0)-TIME(LEFT(F2,2),RIGHT(F2,2),0))+MINUTE(TIME(LEFT(G2,2),RIGHT(G2,2),0)-TIME(LEFT(F2,2),RIGHT(F2,2),0))/60)

以下的公式怎么理解?=IF(OR(F2="",G2=""),0,HOUR(TIME(LEFT(G2,2),RIGHT(G2,2),0)-TIME(LEFT(F2,2),RIGHT(F2,2),0))+MINUTE(TIME(LEFT(G2,2),RIGHT(G2,2),0)-TIME(LEFT(F2,2),RIGHT(F2,2),0))/60)
简单讲:
如果F2或G2任意1个为空白,就显示0
反之就计算G2 F2 之间的小时数是多少?

你这个公式写复杂了,好像不对吧?
简化为:
=IF(OR(G2="",F2=""),0,HOUR(G2-F2)+(MINUTE(G2-F2)/60))
结果4.27小时