+ Reply to Thread
Results 1 to 5 of 5

Problem subtracting times

  1. #1
    Registered User
    Join Date
    11-22-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Problem subtracting times

    Hi all,

    I am trying to deduct one time from another. Formatting in [h]:mm works fine EXCEPT when the result is zero, then it comes up as hashes with the message "dates and times that are negative or too large display as ######".

    Any suggestions please?

    Cheers
    Zigi

  2. #2
    Registered User
    Join Date
    12-23-2012
    Location
    Macksville, Australia
    MS-Off Ver
    Excel 365
    Posts
    7

    Re: Problem subtracting times

    If you don't need numerical time values for future calculations, try

    =TEXT(MAX(A2:B2)-MIN(A2:B2),IF(A2<B2,"-","")&"[h]:mm:ss")


    If you do need the times as numerical values then another option is to change Excel's default date system for this workbook to the 1904 date system and negative time should display correctly with a simple subtraction:

    =A2-B2

  3. #3
    Registered User
    Join Date
    11-22-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Problem subtracting times

    Thanks Peter_SSs - I ended up using the 1904 date

  4. #4
    Registered User
    Join Date
    12-23-2012
    Location
    Macksville, Australia
    MS-Off Ver
    Excel 365
    Posts
    7

    Re: Problem subtracting times

    Cheers, glad it worked for you.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Problem subtracting times

    As it appears you've reached a conclusion, I've marked this thread SOLVED for you.
    FYI, this is done through the Thread Tools located above the first post in this thread. Thanks.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Subtracting Times
    By Knawl in forum Excel General
    Replies: 4
    Last Post: 11-02-2010, 03:49 AM
  2. Subtracting times
    By lightsandsirens in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2009, 12:48 PM
  3. [SOLVED] Subtracting times.
    By in forum Tips and Tutorials
    Replies: 5
    Last Post: 03-10-2006, 12:34 PM
  4. Subtracting times
    By gaftalik in forum Excel General
    Replies: 3
    Last Post: 11-02-2005, 02:45 PM
  5. Subtracting Times
    By bhalchandra2000 in forum Tips and Tutorials
    Replies: 1
    Last Post: 08-23-2005, 12:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1