+ Reply to Thread
Results 1 to 4 of 4

Excel time format and calculations -- Ok, I don't get it

  1. #1
    Registered User
    Join Date
    02-06-2014
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2010
    Posts
    48

    Excel time format and calculations -- Ok, I don't get it

    Nothing is as baffling as how excel handles time. I know it counts forward from 1900, etc. However, if I want to enter 2 minutes, 30 seconds into a cell formatted for time, nothing seems to work.

    2.3 gives 12:00.0 or 12 minutes, zero seconds ... what?
    2.5 (two and a half, maybe?) gives 00:00.0 ... what?
    02:30 (I'll just use its syntax) gives 30:00.0 ... huh?

    Then there's the calculations. Let's say it takes me an hour to make 150,000 units of something. I want to know how long it will take to make 789 units. So 789/150,000 in a cell formatted for time, excel tells me that will take 07:24.7 or seven minutes 25 seconds, but that's not right. That's not even close to right.

    So, I don't get it. What's going on?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Excel time format and calculations -- Ok, I don't get it

    In addition to days being the number of elapsed days since 1st January 1900 (i.e. they are always integers), times are stored as fractions of a 24-hour day. So, 12 hours when shown in time format of 12:00:00 is actually stored as 0.5. Another thing to be aware of is if you format a cell as hh:mm:ss, then Excel will only show values between 0:00:00 and 23:59:59, so if you have, say, 37 hours then it will only show 13:00:00. To show it as 37:00:00 you need to format the cell as [hh]:mm:ss - the square brackets prevent Excel from wrapping the times at 24 hours.

    So, if you take 789/150000 the answer is 0.00526 - that is the number of hours it takes. But if you put that fraction in a cell and format it as time, it will be interpreted as 0.00526 of a DAY, which is 0:07:34. To be consistent, you also need to divide by 24, which will give you 0:00:19, or 19 seconds.

    Another approach would be not to format the cell as time - keep it as General and use this formula:

    =789/150000*60*60

    which will give you 18.94 (seconds).

    Yes, it can be confusing, but hope this helps.

    Pete

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel time format and calculations -- Ok, I don't get it

    Hi,

    Like a lot of stuff once you know the rules it's simple

    Time in excel is governed by the decimal part of a number, dates are governed by the integer of a number.

    So entering .25 in a cell formatted as time will show 6:00 AM, 0.5 will show 12:00 AM. i.e. a quarter of the way through a day and half way.

    I don't recognise the numbers you give. Entering 2.3 into a cell formatted as time will show 07:12:00 (hh.mm.ss) since .3 x 24 hours = 7.2. i.e. 7 hours and .2 of an hour or 1/5 of 60 minutes = 12 minutes.


    If you want to enter time directly then enter it as as '2:30' without the ' marks

    To calculate how long it will take to make 789 units when you can make 150000/hour think about it as making 150000*24 = 3,600,000 per day. Now (remember time is a decimal of a day, divide 789 by 3,600,000 and you get the decimal fraction .000219167. Now when you format that to hh:mm:ss you'll see the result as 19 seconds.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    02-06-2014
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Excel time format and calculations -- Ok, I don't get it

    Thanks! Lot's of googling turned up lot's of long discursive discussions about the 1900 issue, but nothing this practical. 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. [SOLVED] excel time calculations sums
    By Jsimpson19 in forum Excel General
    Replies: 11
    Last Post: 12-01-2013, 02:06 AM
  2. 24 time format and calculations
    By [email protected] in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-26-2006, 02:55 PM
  3. Re: 24 time format and calculations
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-25-2006, 05:45 PM
  4. [SOLVED] convert time imported as text to time format for calculations
    By batfish in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-27-2005, 07:05 PM
  5. [SOLVED] time interval calculations in excel
    By Krishna in forum Excel General
    Replies: 6
    Last Post: 04-08-2005, 10:06 AM

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