+ Reply to Thread
Results 1 to 7 of 7

Sum up time

  1. #1
    Registered User
    Join Date
    08-08-2016
    Location
    Geleen
    MS-Off Ver
    Office 2016 Mac
    Posts
    3

    Sum up time

    Hi, Wi have some cells with below mentioned time values, I could not figure out how i should covert them and sum it up. Would appreciate some help.

    Cell1: 15d 20h 2m 25s
    Cell2: 7d 14h 42m 13s
    Cell3: 13d 13h 16m 10s


    I would like to have this as a result on Cell4: 888:00:48

    Thank you.

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

    Re: Sum up time

    Are any of the times less than 0 days?
    If so what is the format for those values, ie does it say 0d or does it just omit that value?
    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 Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Sum up time

    Are the cells formatted as text or as time?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    08-08-2016
    Location
    Geleen
    MS-Off Ver
    Office 2016 Mac
    Posts
    3

    Re: Sum up time

    It can be also less then 0days.

    Then it is like this,

    20h 10m 20s

    or

    15m 35s

    or

    55s

    Cells are formatted as General.

    Thank you,

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Sum up time

    I had hoped that one of the parsing gurus might have picked up on this. They haven't. So, this Brute Force and Ignorance formula, which DOES work is your starting point. Over to others to make a nicer one!!

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-08-2016
    Location
    Geleen
    MS-Off Ver
    Office 2016 Mac
    Posts
    3

    Re: Sum up time

    Thank you it worked exactly how i wanted. Although i made it even longer. It is extreme. :D

    =(IFERROR(LEFT((INDIRECT(A2&"!B3")),FIND("d",(INDIRECT(A2&"!B3")))-1)+0,0)+IFERROR((LEFT(SUBSTITUTE((INDIRECT(A2&"!B3")),LEFT((INDIRECT(A2&"!B3")),FIND("d",(INDIRECT(A2&"!B3")))),""),FIND("h",SUBSTITUTE((INDIRECT(A2&"!B3")),LEFT((INDIRECT(A2&"!B3")),FIND("d",(INDIRECT(A2&"!B3")))),""))-1)+0)/24,0)+IFERROR(LOOKUP(10^10,RIGHT(LEFT(TRIM(MID((INDIRECT(A2&"!B3")),1,LEN((INDIRECT(A2&"!B3")))-3)),LEN(TRIM(MID((INDIRECT(A2&"!B3")),1,LEN((INDIRECT(A2&"!B3")))-3)))-1),ROW(INDIRECT("1:"&LEN(LEFT(TRIM(MID((INDIRECT(A2&"!B3")),1,LEN((INDIRECT(A2&"!B3")))-3)),LEN(TRIM(MID((INDIRECT(A2&"!B3")),1,LEN((INDIRECT(A2&"!B3")))-3)))-1)))))+0)/1440,0)+LOOKUP(10^10,RIGHT(LEFT((INDIRECT(A2&"!B3")),LEN((INDIRECT(A2&"!B3")))-1),ROW(INDIRECT("1:"&LEN(LEFT((INDIRECT(A2&"!B3")),LEN((INDIRECT(A2&"!B3")))-1)))))+0)/86400)+(IFERROR(LEFT((INDIRECT(A2&"!E3")),FIND("d",(INDIRECT(A2&"!E3")))-1)+0,0)+IFERROR((LEFT(SUBSTITUTE((INDIRECT(A2&"!E3")),LEFT((INDIRECT(A2&"!E3")),FIND("d",(INDIRECT(A2&"!E3")))),""),FIND("h",SUBSTITUTE((INDIRECT(A2&"!E3")),LEFT((INDIRECT(A2&"!E3")),FIND("d",(INDIRECT(A2&"!E3")))),""))-1)+0)/24,0)+IFERROR(LOOKUP(10^10,RIGHT(LEFT(TRIM(MID((INDIRECT(A2&"!E3")),1,LEN((INDIRECT(A2&"!E3")))-3)),LEN(TRIM(MID((INDIRECT(A2&"!E3")),1,LEN((INDIRECT(A2&"!E3")))-3)))-1),ROW(INDIRECT("1:"&LEN(LEFT(TRIM(MID((INDIRECT(A2&"!E3")),1,LEN((INDIRECT(A2&"!E3")))-3)),LEN(TRIM(MID((INDIRECT(A2&"!E3")),1,LEN((INDIRECT(A2&"!E3")))-3)))-1)))))+0)/1440,0)+LOOKUP(10^10,RIGHT(LEFT((INDIRECT(A2&"!E3")),LEN((INDIRECT(A2&"!E3")))-1),ROW(INDIRECT("1:"&LEN(LEFT((INDIRECT(A2&"!E3")),LEN((INDIRECT(A2&"!E3")))-1)))))+0)/86400)+(IFERROR(LEFT((INDIRECT(A2&"!H3")),FIND("d",(INDIRECT(A2&"!H3")))-1)+0,0)+IFERROR((LEFT(SUBSTITUTE((INDIRECT(A2&"!H3")),LEFT((INDIRECT(A2&"!H3")),FIND("d",(INDIRECT(A2&"!H3")))),""),FIND("h",SUBSTITUTE((INDIRECT(A2&"!H3")),LEFT((INDIRECT(A2&"!H3")),FIND("d",(INDIRECT(A2&"!H3")))),""))-1)+0)/24,0)+IFERROR(LOOKUP(10^10,RIGHT(LEFT(TRIM(MID((INDIRECT(A2&"!H3")),1,LEN((INDIRECT(A2&"!H3")))-3)),LEN(TRIM(MID((INDIRECT(A2&"!H3")),1,LEN((INDIRECT(A2&"!H3")))-3)))-1),ROW(INDIRECT("1:"&LEN(LEFT(TRIM(MID((INDIRECT(A2&"!H3")),1,LEN((INDIRECT(A2&"!H3")))-3)),LEN(TRIM(MID((INDIRECT(A2&"!H3")),1,LEN((INDIRECT(A2&"!H3")))-3)))-1)))))+0)/1440,0)+LOOKUP(10^10,RIGHT(LEFT((INDIRECT(A2&"!H3")),LEN((INDIRECT(A2&"!H3")))-1),ROW(INDIRECT("1:"&LEN(LEFT((INDIRECT(A2&"!H3")),LEN((INDIRECT(A2&"!H3")))-1)))))+0)/86400)

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Sum up time

    There will be a much easier way. It's just not occurring to me, though!

+ 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. Replies: 0
    Last Post: 03-04-2016, 06:38 PM
  2. [SOLVED] EPOCH Time Conversion to local time and daylight savings time (DST)
    By cwwazy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2015, 02:14 PM
  3. Replies: 10
    Last Post: 11-08-2014, 04:51 PM
  4. Automatic generation of Start time, end time and total time in excel
    By dreamwarden in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2013, 08:03 PM
  5. Replies: 5
    Last Post: 04-18-2013, 11:31 AM
  6. [SOLVED] Extracted time from date/time field does not flag on =IF(TIME function.
    By Vlad717 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-09-2013, 03:29 PM
  7. Replies: 3
    Last Post: 11-06-2012, 01:37 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