ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Another Time Related Question (https://www.excelbanter.com/excel-programming/447099-another-time-related-question.html)

[email protected]

Another Time Related Question
 
I have 2 times:

A) 4:12:31 PM
B) 4:07:45 PM

In a cell I have the formula (TimeB - TimeA). The cell displays a strange number as a result - 23:55:14. I was hoping it would display the actual time difference (negative or positive).

Is that possible ?

Thanks in advance.

[email protected]

Another Time Related Question
 
On Tuesday, September 11, 2012 10:15:13 PM UTC+2, (unknown) wrote:
I have 2 times:



A) 4:12:31 PM

B) 4:07:45 PM



In a cell I have the formula (TimeB - TimeA). The cell displays a strange number as a result - 23:55:14. I was hoping it would display the actual time difference (negative or positive).



Is that possible ?



Thanks in advance.


=TEXT(B1-A1;"hh:mm:ss")

Paga Mike

Quote:

Originally Posted by (Post 1605406)
I have 2 times:

A) 4:12:31 PM
B) 4:07:45 PM

In a cell I have the formula (TimeB - TimeA). The cell displays a strange number as a result - 23:55:14. I was hoping it would display the actual time difference (negative or positive).

Is that possible ?

Thanks in advance.

Format the result cell as:
hh:mm:ss
If you anticipate a negative result, you should use the 1904 Date system

[email protected]

Another Time Related Question
 
On Wednesday, September 12, 2012 8:42:47 AM UTC-4, Paga Mike wrote:
;1605406 Wrote: I have 2 times: A) 4:12:31 PM B) 4:07:45 PM In a cell I have the formula (TimeB - TimeA). The cell displays a strange number as a result - 23:55:14. I was hoping it would display the actual time difference (negative or positive). Is that possible ? Thanks in advance. Format the result cell as: hh:mm:ss If you anticipate a negative result, you should use the 1904 Date system -- Paga Mike


Thanks All. I tried what was suggested but still get this result:

A) 11:21:49
B) 11:21:14

B - A = 23:59:25

Any thoughts ?

Paga Mike

Quote:

Originally Posted by (Post 1605438)
On Wednesday, September 12, 2012 8:42:47 AM UTC-4, Paga Mike wrote:
;1605406 Wrote: I have 2 times: A) 4:12:31 PM B) 4:07:45 PM In a cell I have the formula (TimeB - TimeA). The cell displays a strange number as a result - 23:55:14. I was hoping it would display the actual time difference (negative or positive). Is that possible ? Thanks in advance. Format the result cell as: hh:mm:ss If you anticipate a negative result, you should use the 1904 Date system -- Paga Mike


Thanks All. I tried what was suggested but still get this result:

A) 11:21:49
B) 11:21:14

B - A = 23:59:25

Any thoughts ?

With the 1904 Date system switched on I get:

-0:00:35

[email protected]

Another Time Related Question
 

try

=TEXT((A-B),"[s]")



On Tuesday, 11 September 2012 21:15:13 UTC+1, (unknown) wrote:
I have 2 times:



A) 4:12:31 PM

B) 4:07:45 PM



In a cell I have the formula (TimeB - TimeA). The cell displays a strange number as a result - 23:55:14. I was hoping it would display the actual time difference (negative or positive).



Is that possible ?



Thanks in advance.



Caveman1957

1904 date system is turned on for a workbook under
options-advanced-When calculating this workbook.

I had to search for it so I thought I would save other people the trouble ;)

DeFautT

Quote:

Originally Posted by (Post 1605406)
I have 2 times:

A) 4:12:31 PM
B) 4:07:45 PM

In a cell I have the formula (TimeB - TimeA). The cell displays a strange number as a result - 23:55:14. I was hoping it would display the actual time difference (negative or positive).

Is that possible ?

Thanks in advance.

This looks correct for what you are asking. Thinking in pure math terms, you are subtracting a large number from a smaller one which will always return a negative number. To get the difference between the two times, you need to subtract the start time (4:07:45) from the end time (4:12:31).


All times are GMT +1. The time now is 09:11 PM.

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