+ Reply to Thread
Results 1 to 3 of 3

negative time beyond 24hrs

  1. #1
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    negative time beyond 24hrs

    Hi,

    I'm using the following formula on a spreadsheet to check how many flexi hours someone owes/ is owed:

    =IF(E6<0,TEXT(E8/1440,"-H::MM"),TEXT(E8/1440,"H::MM"))

    E6 contains a decimal value of the time, e.g. -2 and E8 contains a positive value of that time in minutes, e.g. 120.

    This formula works fine until you go beyond 24 hours and then it counts from 1 again, i.e. if a person were to owe 1500 minutes the formula returns -1:00 instead of -25:00.

    How can I fix this? I can't change the sheet to 1904 date format due to other processes.

    Help!

    SA
    Last edited by SAsplin; 05-10-2012 at 07:58 AM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: negative time beyond 24hrs

    Try this

    =IF(E6<0,"-","")&TEXT(ABS(E8)/1440,"[h]:mm")

  3. #3
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: negative time beyond 24hrs

    Bob, that works a treat. Many thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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