ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculating time difference (https://www.excelbanter.com/excel-discussion-misc-queries/2428-calculating-time-difference.html)

Robyn Bellanger

Calculating time difference
 
I am trying to come up with a formula that will give the result shown as
below:

Time (total hrs worked) is in d2 and shows 8.35 hrs.

Employee should have worked 8.5 hrs. I need a formula that will return the
difference of .15 in minutes short.

Please let me know if you can help!!

Thanks,

Robyn



Max

With A1 and B1 containing the numbers 8.35 and 8.5,

Put in say, C1: =(B1-A1)/24
and Format C1 as time ("13:30" format)

C1 will return "0:09"
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Robyn Bellanger" wrote in message
...
I am trying to come up with a formula that will give the result shown as
below:

Time (total hrs worked) is in d2 and shows 8.35 hrs.

Employee should have worked 8.5 hrs. I need a formula that will return

the
difference of .15 in minutes short.

Please let me know if you can help!!

Thanks,

Robyn





Max

Put in say, C1: =(B1-A1)/24

The above presumes B1 will always be =A1

Perhaps a more apt formula could be:
=IF(A1<B1,(B1-A1)/24,"")

which'll return blanks: ""
if A1=B1

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----




All times are GMT +1. The time now is 08:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com