Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]() |
|||
|
|||
![]() Quote:
hh:mm:ss If you anticipate a negative result, you should use the 1904 Date system |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ? |
#4
![]() |
|||
|
|||
![]() Quote:
-0:00:35 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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") |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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. |
#7
![]() |
|||
|
|||
![]()
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 ;) |
#8
![]() |
|||
|
|||
![]()
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).
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run time error related to add-ins | Excel Discussion (Misc queries) | |||
date related question??? | Excel Worksheet Functions | |||
Input Box Related Question | Excel Programming | |||
Input Box Related Question | Excel Programming | |||
I have a VB related question,... | Excel Programming |