Excel time difference, including hundredth of a se

2019-08-12 07:39发布

i want to calculate time difference using excel, between two cells containing numbers in format hh:mm:ss,00. a simple subtraction doesn't work. Anyone can help me? thanks

标签: excel time
4条回答
Fickle 薄情
2楼-- · 2019-08-12 08:10

If the two cells contain valid time values then a subtraction should work assuming you are subtracting the smaller value from the larger one (Excel doesn't like negative time values unless you use 1904 Date System).

What formula did you try? What result did you get, what result do you expect?

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-08-12 08:27

You can use the If function so that you don't get the negative error. Do

Instead of =TEXT(A1-B1)

You can do:

=IF(A1>B1,A1-B1,B

查看更多
啃猪蹄的小仙女
4楼-- · 2019-08-12 08:29

After a long search, found this out.

=VALUE(LEFT(B4,8)-LEFT(A4,8))+VALUE((RIGHT(B4,3)/86400000)-(RIGHT(A4,3)/86400000))
查看更多
爱情/是我丢掉的垃圾
5楼-- · 2019-08-12 08:36

I know this question is pretty much dead now but I was looking at this earlier while trying to make a good formula to calculate hours worked in an office. Like by hour and minute. What I came up with was this:

=HOUR([@[Time Ended]])-HOUR([@[Time Started]])+(MINUTE([@[Time Ended]])-MINUTE([@[Time Started]]))/60

This was the formula I used in my hours column in my table to calculate the hours worked from two times, Time Started and Time ended. Notice I had to do the hour and minutes seperately, this is because there are two different functions for these. There is also a function for the seconds in a time, if you include seconds in the inputed time. Adding this into the formula above wouldn't be too difficult.

查看更多
登录 后发表回答