+ Reply to Thread
Results 1 to 4 of 4

How to display negative time in days hh:mm format

  1. #1
    Registered User
    Join Date
    03-08-2018
    Location
    Derbyshire, England
    MS-Off Ver
    Excel 2016, Office 365
    Posts
    33

    How to display negative time in days hh:mm format

    I have an Excel leave card which I'm having problems with displaying negative time in the days hh:mm format.

    I've switched the workbook to the 1904 time format, so cells where I need to display time in hh:mm format where someone's exceeded their leave allowance are displaying just fine, displaying the '-' sign, but I can't figure out how to display it in the days hh:mm format. It's further complicated (at least it is with my level of understanding of Excel!) as the formula that produces the days hh:mm display is quite a complex one to prevent rounding errors that dogged earlier versions of the form.

    On the 'Leave' sheet, column K (K30:K72) each cell subtracts the amount of leave requested from the previous remaining time. Switching to the 1904 date format correctly shows the time in hh:mm as a negative number, but if it's a negative number, column L (L30:L72) simply shows 'ERROR', as does cell P23. I want these cells to show the number of days, hours and minutes by which the employee has exceeded their leave allowance, for example:

    Please Login or Register  to view this content.
    The attached file is a working example of the form with some test data in it.
    Attached Files Attached Files
    Last edited by BlissC; 06-26-2020 at 07:47 AM. Reason: incorrect attachement uploaded

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: How to display negative time in days hh:mm format

    Given 1904 in place, you could try replacing both instances of 1/86400 with SIGN($K42)/86400
    (and apply revised formula to the other rows)

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: How to display negative time in days hh:mm format

    Try...
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Though, I'd recommend avoiding use of 1904 date system. But have calculation staging sheet to perform necessary calculations using underlying datetime value.
    Sheet1 for data entry and display only (i.e. pull calculation result from another sheet).
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  4. #4
    Registered User
    Join Date
    03-08-2018
    Location
    Derbyshire, England
    MS-Off Ver
    Excel 2016, Office 365
    Posts
    33

    Re: How to display negative time in days hh:mm format

    Thank you. That works perfectly.

+ 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. [SOLVED] Display a negative time format in hours - custom tt:mm
    By annica123 in forum Excel General
    Replies: 9
    Last Post: 10-02-2019, 10:29 AM
  2. Trying to display negative time
    By Ale1x in forum Excel General
    Replies: 3
    Last Post: 05-30-2012, 01:16 PM
  3. Display negative time?
    By richarddd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-14-2008, 06:19 AM
  4. How do I get Excel to display a negative value for time?
    By labrat in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-07-2006, 03:15 PM
  5. [SOLVED] How do I display time in a negative format?
    By PCERM in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-28-2005, 10:00 AM
  6. Replies: 2
    Last Post: 10-16-2005, 05:05 PM
  7. What is the formula to display a negative time results?
    By Robluc65 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-14-2005, 07:05 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