Thread: Datediff()
View Single Post
 
Old 06-23-2018, 12:06 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Code:
=INDIRECT(I1)-INDIRECT(H1)
and format as "[h]:mm".

The result is displayed as the number of full hours and remaining minutes.

NB! The result is really a date!, i.e. 24 hours equals with 1. When you need to use the result as e.g. multipler for some value defined on hour basis, then you have to multiple the result of formula with 24. And when you do this for formula displayed on worksheet, then you have to format the sell as General instead using date/time format.
Reply With Quote