Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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")
  #3   Report Post  
Junior Member
 
Location: Lakehurst, NJ, USA
Posts: 19
Default

Quote:
Originally Posted by View Post
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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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 ?
  #5   Report Post  
Junior Member
 
Location: Lakehurst, NJ, USA
Posts: 19
Default

Quote:
Originally Posted by View Post
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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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.


  #7   Report Post  
Junior Member
 
Posts: 18
Default

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   Report Post  
Junior Member
 
Posts: 15
Default

Quote:
Originally Posted by View Post
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).
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run time error related to add-ins Grant Excel Discussion (Misc queries) 0 June 13th 09 03:48 PM
date related question??? _Bigred Excel Worksheet Functions 1 January 4th 07 01:23 AM
Input Box Related Question Kevin B Excel Programming 0 January 19th 06 03:31 PM
Input Box Related Question Barb Reinhardt Excel Programming 0 January 19th 06 03:02 PM
I have a VB related question,... javabeens Excel Programming 1 June 7th 05 05:51 PM


All times are GMT +1. The time now is 06:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"