#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default time formulas

I have times generated in h:mm in cell A1 and A2 I need a formula in A3 that
subtracts A2 from A1 and produces the difference (either negative or
positive) in h:mm.
For instance, the time in A1 is 6:15 and the time in A2 is 6:00 I need A3
to return -:15 or -0:15. All I can get is ###########.

Thank you in advance for any help offered.

--
bob
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default time formulas

If you want to make use of negative times you will have to switch to
the 1904 date system rather than the default 1900. However, this can
cause problems if you need to put the file on a system with 1900 as
the base - dates will appear to be 4 years and one day out.

Hope this helps.

Pete

On Mar 12, 1:38*am, vdmbqb wrote:
I have *times generated in h:mm in cell A1 and A2 I need a formula in A3 that
subtracts A2 from A1 and produces the difference (either negative or
positive) in h:mm.
For instance, the time in A1 is *6:15 and the time in A2 is 6:00 I need A3
to return -:15 or -0:15. All I can get is ###########.

Thank you in advance for any help offered.

--
bob


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default time formulas

hi
at pete stated the 1900 date keeping system will not show negative times.
the 1904 system will but it was developed for mac and will be out of cinque
with windows based pc systems.
you could have a formula that converts the negative time to a positive time.
=IF(A2-B2<0,(A2-B2)*-1,A2-B2)
then in a column next to it, something like this.....
=IF(A2-B2<0,"Neg","Pos")
but this would take 2 cells. and present a math problem should you need to
total the times.
another way was posted by dave peterson.
=IF(A2<B2,"-","")&TEXT(ABS(B2-A2),"mm:ss")
the negative time would be in 1 cell but you wouldn't be able to do math
with the above formula.

no easy way to handle negative times in excel.

regards
FSt1


"vdmbqb" wrote:

I have times generated in h:mm in cell A1 and A2 I need a formula in A3 that
subtracts A2 from A1 and produces the difference (either negative or
positive) in h:mm.
For instance, the time in A1 is 6:15 and the time in A2 is 6:00 I need A3
to return -:15 or -0:15. All I can get is ###########.

Thank you in advance for any help offered.

--
bob

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
Time formulas Blazingsaddles Excel Worksheet Functions 15 October 9th 07 10:51 PM
Time Formulas MuncieJeff Excel Discussion (Misc queries) 2 December 8th 06 10:22 PM
Using Time in Formulas Cheri Excel Discussion (Misc queries) 6 November 10th 06 04:58 PM
Time Formulas metaltecks Excel Discussion (Misc queries) 1 March 30th 06 12:51 AM
Time formulas famdamly Excel Discussion (Misc queries) 1 March 1st 06 04:34 PM


All times are GMT +1. The time now is 02:21 PM.

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

About Us

"It's about Microsoft Excel"