Page 1 of 1
difference calculation
Posted: Thu Sep 24, 2020 10:40 am
by sna
Hi Dear
How to calculate the difference in hh:mm.
For example I have in cell A2:10:30 ,B2:11
The result would be C2:0:30
I use this
=B2-A2 but no luck
Thanks
Re: difference calculation
Posted: Thu Sep 24, 2020 11:32 am
by Supachok
Hi sna
=IF(INT(B2),(B2/24),B2)-IF(INT(A2),(A2/24),A2)
Try this formula in cell c2.
Re: difference calculation
Posted: Thu Sep 24, 2020 4:14 pm
by sna
This will work but if start is 23:20 and end is 1:30 this not working fine
Re: difference calculation
Posted: Thu Sep 24, 2020 7:59 pm
by snasui
sna wrote: Thu Sep 24, 2020 10:40 am
How to calculate the difference in hh:mm.
For example I have in cell A2:10:30 ,B2:11
The result would be C2:0:30
I use this
=B2-A2 but no luck

Try this,
=B2-A2+(B2<A2)
Re: difference calculation
Posted: Fri Sep 25, 2020 5:26 am
by sna
It doesn't work
Re: difference calculation
Posted: Fri Sep 25, 2020 9:14 am
by Supachok
This see revise formula as below
the cause of error is time cannot be minus value this formula will be calculate in one day over night is over scope.
=ABS(IF(INT(B2),(B2/24),B2)-IF(INT(A2),(A2/24),A2))