+ Reply to Thread
Results 1 to 5 of 5

need help with duration (cumulative time) calculation

  1. #1
    Registered User
    Join Date
    02-14-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    need help with duration (cumulative time) calculation

    Hello;
    I'm trying to come up with an elegant way to calculate time duration as a sum of cells which contain either m:ss, or mm:ss, or h:mm:ss, or, finally, hh:mm:ss (these are individual durations, which I want to add, to obtain the total time)

    An excerpt from the data set:
    0:11 (0 min 11 s)
    14:42 (14 min, 42 s)
    24:08:00
    0:04
    2:36
    0:40

    I've get the data by cutting and pasting from an html report.
    If I change the column display format to General, the above numbers change to decimal (I know this is how excel is keeping time internally), but I think Excel messes the things up, considering for instance 0:11, as 0:11:00. I believe it does that, because if I change the display format into Time, that's what it does to all values.

    I started creating an arcane formula, evaluating string lengths and using left, right and mid to extract the values for each column, but it is quite strange to have to do that. It also doesn't work, because Excel doesn't allow me to operate on the cell as a string of characters. It does its own thing, and the string operators don't make sense... Unless I convert that column into text (outside excel - in notepad - and re-paste it in, formatting the column as Text). After that string operators work, but I won't call this a solution ...

    Any suggestions?
    Thanks much,
    HG
    Last edited by hgeorges; 07-29-2014 at 04:02 PM.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: need help with duration (cumulative time) calculation

    For the durations where Excel considers seconds to be minutes, etc, have you considered dividing by 60?
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    02-14-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: need help with duration (cumulative time) calculation

    Not sure what you are asking - I'm sorry. I didn't divide by 60. I actually realized an inconsistency - the durations could not have been hours - the html report was formatted inconsistently. All should have been mm:ss, or m:ss. there are no hours in the mix. Therefore the line items like the one showing 24:08:00, are in fact 24:08 (24 min, 8 s).
    Nevertheless the question is up - as a more general case.
    Thank you for taking the time.
    Hg

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: need help with duration (cumulative time) calculation

    If you are pasting your examples into Excel, they will most likely be interpreted as time values. To resolve this, simply divide the pasted values by 60 to convert hours to minutes and minutes to seconds.

    For example, Excel will, by default, interpret "2:36" as 2 hours and 36 minutes. Divide this pasted value by 60 to get 2 minutes and 36 seconds.

  5. #5
    Registered User
    Join Date
    02-14-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: need help with duration (cumulative time) calculation

    Brilliant! Thank you!

+ 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] Sumproduct with Time Duration calculation
    By gav0101 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-05-2012, 06:34 PM
  2. Using duration in a calculation H:mm:ss to decimal
    By grigsy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-27-2011, 03:33 AM
  3. Having problem with Duration calculation
    By Dreammy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-23-2010, 01:44 PM
  4. Having problems with a duration calculation
    By Tommicpet in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2008, 10:02 AM
  5. [SOLVED] Fixed Duration-strange calculation
    By TraceyH in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-15-2005, 07: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