You will need to convert the time into the integer hours you had in the first worksheet.
Try in E8 =(D8-C8)*24
If you are not aware of it times in Excel are numbers --- the decimal fraction of a day (24 hours).
Expressed as integer hours as in your first workbook:
17.5/24=0.729166666666667 =formatted for time 5:30 PM
20/24=0.833333333333333 =formatted for time 8:00 PM
(20-17.5)=2.5
2.5/24 = 0.104166666666667 =formatted hours:minutes (h:mm) 2:30
The formatting is cosmetic. It has no affect upon the underlying values.
To get the results of actual time returned as whole numbers multiply the times by 24.
Bookmarks