Working with time DURATION, not time of day

后端 未结 9 929
后悔当初
后悔当初 2020-12-13 17:07

I\'m doing some benchmarking, and I want to use Excel to produce graphs of the results. I\'ve got a simple but annoying problem which is baking my noodle.

The proble

9条回答
  •  [愿得一人]
    2020-12-13 17:30

    Let's say that you want to display the time elapsed between 5pm on Monday and 2:30pm the next day, Tuesday.

    In cell A1 (for example), type in the date. In A2, the time. (If you type in 5 pm, including the space, it will display as 5:00 PM. If you want the day of the week to display as well, then in C3 (for example) enter the formula, =A1, then highlight the cell, go into the formatting dropdown menu, select Custom, and type in ffffdd.

    Repeat all this in the row below.

    Finally, say you want to display that duration in cell D2. Enter the formula, =(a2+b2)-(a1+b1). If you want this displayed as "22h 30m", select the cell, and in the formatting menu under Custom, type in h"h" m"m".

提交回复
热议问题