Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() I have 2 times : 16:20 and 01:02 Trying to find the difference in hours between these times. Used this formula : =(((HOUR(H135-I135)-24)*60)+MINUTE(H135-I135))/60 However the difference comes up as a negetive numbe. I understand the 24 hour clock peice and why this is happening. Is there a way to return the correct number as a positive value of hours between these 2 times? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In article , ?B?SmF5?= wrote:
I have 2 times : 16:20 and 01:02 Trying to find the difference in hours between these times. Used this formula : =(((HOUR(H135-I135)-24)*60)+MINUTE(H135-I135))/60 However the difference comes up as a negetive numbe. I understand the 24 hour clock peice and why this is happening. Is there a way to return the correct number as a positive value of hours between these 2 times? Suggest using dates/times. I suspect the negative number you are getting is right (as you are subtracting 16:20 from 02:02 ?) ... but what you are trying to do is get the hours from 16:20 to 01:02 *the next day* ?? Remember that standard dates and times are just numbers in XL ... it's all in the formatting as to what you see. :) |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you want to find the time difference between 16:20 one day and 01:02 the
next day, you might try =MOD(I135-H135,1) and format as [hh]:mm, or if you want a number of hours in decimal use =MOD(I135-H135,1)*24 and format as number or general, not time. -- David Biddulph "Jay" wrote in message ... I have 2 times : 16:20 and 01:02 Trying to find the difference in hours between these times. Used this formula : =(((HOUR(H135-I135)-24)*60)+MINUTE(H135-I135))/60 However the difference comes up as a negetive numbe. I understand the 24 hour clock peice and why this is happening. Is there a way to return the correct number as a positive value of hours between these 2 times? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculating Difference in Time (Amt. of Time Transpired) | Excel Discussion (Misc queries) | |||
find the difference between start time and end time when spanning. | Excel Discussion (Misc queries) | |||
subtract the time difference from another time difference | Excel Discussion (Misc queries) | |||
Time difference calculations, daylight savings time, Excel | Excel Discussion (Misc queries) | |||
Negative time should be allowed in Excel, eg time difference | Excel Discussion (Misc queries) |