+ Reply to Thread
Results 1 to 5 of 5

Help with Time format

Hybrid View

  1. #1
    Registered User
    Join Date
    12-02-2011
    Location
    Maryland
    MS-Off Ver
    Excel 365
    Posts
    42

    Help with Time format

    Can someone please explain to me why the result in M14 shows 7 Hrs and 60 Min, rather than 0 Min?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,080

    Re: Help with Time format

    Prob a rounding problem.

    Use
    =INT(L10)&" Hrs "&MOD(L10,1)*60&" mins"

    though I keep getting a VALUE error in your spreadsheet, this works in a blank spreadsheet though.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,428

    Re: Help with Time format

    As Special-K notes, this looks like standard floating point error (a few links discussing floating point errors https://www.excelforum.com/groups/ma...nd-errors.html ). To see this, I entered =(L14-7) into a convenient cell and formatted as scientific (result was -8.9E-16, suggesting a value slightly smaller than exactly 7).

    Rather than fix this in M like Special-K suggests, I would probably fix this in column L. Nest the existing function inside of a ROUND() function =ROUND(current function,2) [note that I picked 2 decimals to round to because your number format rounds all numbers to the nearest hundredth of an hour. Replace the 2 with a more suitable value, if needed].
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,960

    Re: Help with Time format

    You could use, in M10:M16
    =(K10-C10)-(F10-D10)-(J10-H10)
    with custom format:
    h "Hrs" mm "Min"

    L10:
    =M10*24, formatted as decimal

    M18:
    =SUM(M10:M16)
    custom format:
    [h] "Hrs" mm "Min Total for week"
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    12-02-2011
    Location
    Maryland
    MS-Off Ver
    Excel 365
    Posts
    42

    Re: Help with Time format

    Thank you all for your insight. This was an old spreadsheet done on my first accounting internship years ago in the 90's, originally using Quattro Pro(Borland). I hadnt recalled the calc error before. I ended up using protonLeahs suggestion, as it simplified it with desired result. Thanks again

+ 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. VBA calculate sleep time, when time is entered in military time format
    By axm1955 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-29-2017, 10:28 AM
  2. [SOLVED] time sheet help, format TIME and formula based on the actual time entered.
    By bh mng in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-06-2016, 01:10 PM
  3. Format time from military time to standard time
    By Valencia0307 in forum Excel General
    Replies: 7
    Last Post: 06-01-2014, 11:15 AM
  4. Change format of lots of data cell to a time format
    By dazza67 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-24-2013, 03:24 PM
  5. Convert date and time in serial number format to text format
    By nda13112 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2013, 02:45 PM
  6. Excel: How to convert time format into number format that can be added?
    By Frances Jones in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-17-2012, 04:10 PM
  7. Display time in time format instead of decimal format
    By CasualVisitor in forum Excel General
    Replies: 5
    Last Post: 07-03-2009, 06:24 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