[英]How to calculate time difference between two cells in Excel
I've time value in two columns in my sheet. 我在工作表的两列中有时间值。 Ex: Col A & B
例如:A和B栏
In col C i want the time difference between time in A & B 在col C中,我想要A和B中的时间之间的时差
Example : 范例:
But it is giving me seconds difference. 但这给了我几秒钟的差异。
I've tried the formula =INT((B2-A2)*24)
but i got hours alone. 我已经尝试过公式
=INT((B2-A2)*24)
但我一个人呆了几个小时。
My expected result is how many hours,min,seconds differed 01:20:52
in two cells. 我的预期结果是两个单元格中的小时,分钟,秒数相差
01:20:52
。
How to get that? 如何获得?
将单元格公式设置为=b2-a2
(即应从较大的值中减去较小的值,反之亦然),并将该单元格的格式设置为Time
或[h]:mm:ss
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.