+ Reply to Thread
Results 1 to 12 of 12

Average of times which are in dd:hh:mm format

  1. #1
    Registered User
    Join Date
    03-26-2008
    Posts
    8

    Average of times which are in dd:hh:mm format

    How can you find the average of times?

    I have times like
    00:01:00
    00:00:15
    00:00:08
    All are in dd:hh:mm format
    I need to find their average which shld be 00:00:28 (approx 27.6 mins)
    When I do average(A1:C1) its giving me div/0 error.

    Is there any other format i can change my times to?
    Thanks!!!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    The formula is fine. Make sure the times are actually times, and not stored as text.

  3. #3
    Registered User
    Join Date
    03-26-2008
    Posts
    8
    Yeah all the times are in dd:hh:mm format only. The answers column format is also in dd:hh:mm...Its still givng #Div/0! error..

  4. #4
    Registered User
    Join Date
    03-26-2008
    Posts
    8
    When i am typing 00:01:00 its automatically taking 1/0/1900 12:01:00 AM...Y is that so??

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    The fact thay you've formatted the cells that way doesn't mean that that's the way they are stored.

    Change the format to General and you'll see that the appearance doesn't change, because they are stored as text strings that look like times.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Dates and times in Excel are numbers counting from 1/0/1900 (which is 12/31/1899). The integer part is the number of elapsed whole days, and the decimal part is the time. How it appears is just a matter of formatting.

  7. #7
    Registered User
    Join Date
    03-26-2008
    Posts
    8
    yeah thts correct... But now how do I change this...What do I change that it takes it as dd:hh:mm and calculates the average...Sorry but am quite new to all this

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Format the cells in whatever date format you wish (e.g., dd:hh:mm), enter the data, and use the average formula.

    The salient point is this: dates and times are just numbers to Excel, like any other. They can be formatted to look different, but the underlying number is the same. What you have are strings of text ("Bob", "Hello", "01:32:33")that happen to look like dates, but are still just strings to Excel. It happens sometimes when data is imported.

    If you set the format to a date format, then you can convert those strings to dates by retyping them (ouch!), or
    • Select an empty cell and copy it
    • Select all the cells containing those date strings
    • Do Edit > Paste Special, check Values and Add, and then click OK

    The reason this works is that when Excel is told to perform an arithmetic operation with a string (adding zero in this case), it coerces the numeric string to a number (in this case, a date) and then performs the operation.

    "Bob" and "Joe" couldn't be converted to numbers, but a string that looks like a date can be (and is) converted to a date so the operation can be performed.

    Capische?
    Last edited by shg; 04-03-2008 at 12:38 AM.

  9. #9
    Registered User
    Join Date
    03-26-2008
    Posts
    8
    I am attaching my file.Could you please go through it let me know why it is giving tht error. Sorry for the inconvenience!!!
    Attached Files Attached Files

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    See attached.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    03-26-2008
    Posts
    8
    But does this format work with [d]:hh:mm?

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Try it and see.

+ 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