Anthony
Anthony

Reputation: 552

Date and time in two columns respectively. How to obtain difference in hours?

I have a large spreadsheet in which a start date is captured in cell D10 and a start time in E10. The end date is captured in J10 and end time in K10. In column y I need the difference in hours such that I may total column y to give me the total in hours that the generator was utilised in a month.

I have tried concatenating then using a formula like :- =TEXT(x10-w10, "d:h:mm")

Upvotes: 0

Views: 65

Answers (1)

Try

=(J10+K10-D10-E10)*24

Then change format to number.

In Excel, a day difference is equal to 1, therefore an hour difference is equal to 1/24.

Upvotes: 1

Related Questions