+ Reply to Thread
Results 1 to 6 of 6

convert hh:mm:ss-hh:mm:ss to seconds-seconds

Hybrid View

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

    Re: convert hh:mm:ss-hh:mm:ss to seconds-seconds

    Assuming your data is in A2, you can use this formula:

    =LEFT(A2,SEARCH(" -",A2)-1)*60*60*24 &" - "&RIGHT(A2,LEN(A2)-SEARCH("- ",A2)-1)*60*60*24

    Hope this helps.

    Pete

  2. #2
    Registered User
    Join Date
    10-11-2012
    Location
    Provo, UT
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: convert hh:mm:ss-hh:mm:ss to seconds-seconds

    Thank you! that solved it for me.

  3. #3
    Registered User
    Join Date
    10-11-2012
    Location
    Provo, UT
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: convert hh:mm:ss-hh:mm:ss to seconds-seconds

    If some of the times were entered as just mm:ss-mm:ss how can I adjust the formula?

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

    Re: convert hh:mm:ss-hh:mm:ss to seconds-seconds

    It's a bit messy, but you could do this:

    =LEFT(A2,SEARCH(" -",A2)-1)*if(len(LEFT(A2,SEARCH(" -",A2)-1))<=5),1,60)*60*24 &" - "&RIGHT(A2,LEN(A2)-SEARCH("- ",A2)-1)*if(len(RIGHT(A2,LEN(A2)-SEARCH("- ",A2)-1))<=5,1,60)*60*24

    Hope this helps.

    Pete

+ 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