ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculate the difference two times (https://www.excelbanter.com/excel-discussion-misc-queries/35651-calculate-difference-two-times.html)

Chi

Calculate the difference two times
 
Hi,
Please show me to fix these problems. Thanks
Ex: 12:30 Am - 11:25 Pm= #VALUE
and
2:50-2:52=# VALUE.


Thank you
Chi

Roger Govier

With your times in A1 and B1
=MOD(B1-A1,1)

--
Regards
Roger Govier
"Chi" wrote in message
...
Hi,
Please show me to fix these problems. Thanks
Ex: 12:30 Am - 11:25 Pm= #VALUE
and
2:50-2:52=# VALUE.


Thank you
Chi




Mangus Pyke

On Sat, 16 Jul 2005 06:20:02 -0700, Chi
wrote:
Please show me to fix these problems. Thanks
Ex: 12:30 Am - 11:25 Pm= #VALUE
and
2:50-2:52=# VALUE.


Or, assuming that your times are in A1 and B1:

=IF(A1B1,A1-B1,B1-A1)

Or..

Change your times for 12:30am where you're tracking from the previous
day to 24:30 instead of 00:30.

MP-

--
"Learning is a behavior that results from consequences."
B.F. Skinner


All times are GMT +1. The time now is 10:35 PM.

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