Excel TIME duration over 24 hours

后端 未结 3 1137
情深已故
情深已故 2021-01-27 04:05

Data is:

A1 = 29. B1 = 30. C1 = 2. 

D1 = TIME(A1, B1, C1).

How can I get D1 to return 29:30:02?

Formatting the D1 cell to

相关标签:
3条回答
  • 2021-01-27 04:30

    Time is trying to give you clock time so 29hrs=5am. So if you want that result how about just:

    D1=CONCATENATE(A1,":",B1,":",C1)
    

    If then you want the 02 you would have to interject a little formatting to those columns...

    0 讨论(0)
  • 2021-01-27 04:40

    The result you get is exactly how TIME function works:

    Hour Required. A number from 0 (zero) to 32767 representing the hour. Any value greater than 23 will be divided by 24 and the remainder will be treated as the hour value. For example, TIME(27,0,0) = TIME(3,0,0) = .125 or 3:00 AM.

    You could do

    =A1/24+B1/24/60+C1/24/60/60 in D1

    Then the resulting value formatted as [hh]:mm:ss will show 29:30:02.

    That is because 1 is 1 day in Excel. So 1/24 is 1 hour, 1/24/60 is 1 minute and 1/24/60/60 is 1 second.

    0 讨论(0)
  • 2021-01-27 04:42

    Very similar solution as given above by Axel Richter is shown in support article Add or subtract time by Microsoft.

    Basically it boils down to using custom format of [h]:mm;@. However I am not sure, what the exact difference to [hh]:mm:ss (or more precisely to [hh]:mm) is - if at all? A quick check in Excel did not reveal any differences to me.

    However, as the support article covers topic of adding and subtracting of time values pretty comprehensively, I hope it will be useful to be cited here.

    0 讨论(0)
提交回复
热议问题