+ Reply to Thread
Results 1 to 6 of 6

Min/Sec issue

  1. #1
    Registered User
    Join Date
    03-19-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Min/Sec issue

    I have a log that imports a duration as '9 s.' without the quotes of course, and if it exceeds seconds it will be 1.2 min. Is there any way to convert this via formula or other method to display it as mm ss ?? Any help would be GREATLY appreciated!

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Min/Sec issue

    If it's actually appearing in the cell as 9 s. it's probably a string (non-number). Does it always follow that format; i.e. 9 s. 22 s. 134 s. ?
    If so, in a separate column (let's assume the data starts in A1),

    Answer deleted, Terrible answer. Forget I said anything. LOL
    Last edited by ChemistB; 04-05-2012 at 11:29 AM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Min/Sec issue

    ...and 1.2 minutes means 1 minute 12 seconds, right?

    If it can only be one of those formats or the other then with data in A1 try this formula in B1

    =SUBSTITUTE(SUBSTITUTE(A1,"s",""),"min","")/IF(COUNTIF(A1,"*min*"),1440,86400)

    custom format B1 as mm:ss
    Audere est facere

  4. #4
    Registered User
    Join Date
    03-19-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Min/Sec issue

    I attached a test file for example.

    Yes 1.2 min equals 1 min 12 seconds

    Will that formula still apply?

    Dates Test.xlsx

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Min/Sec issue

    It works for me with a small tweak (had to change s to s. and min to min.)

    Put this formula in C2

    =SUBSTITUTE(SUBSTITUTE(A2,"s.",""),"min.","")/IF(COUNTIF(A2,"*min*"),1440,86400)

    format as mm:ss and then copy to D2 and down both columns

  6. #6
    Registered User
    Join Date
    03-19-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Min/Sec issue

    That worked! You guys are geniuses! Thank you so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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