+ Reply to Thread
Results 1 to 9 of 9

fixing a duration in mm:ss entered as a time of day (hh:mm:ss)

  1. #1
    Registered User
    Join Date
    01-13-2016
    Location
    Auckland, NZ
    MS-Off Ver
    2013
    Posts
    14

    fixing a duration in mm:ss entered as a time of day (hh:mm:ss)

    we use an online 'job sheet' of sorts that provides various details of time based travel jobs.
    The data can be downloaded as n excel sheet, and I want to make some calculations.

    however one column 'D' provides the start time of the job (e.g. 30/11/2018 8:29) and 'E' gives the duration 17:22. the 17:22 is minutes and seconds but is formatted as hh:mm:ss i.e. it thinks that 17:22 is 5:20 PM.
    is there an easy way to convert it to mm:ss? obviously just changing the format is not the solution unfortunately!

    many thanks, Theo

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: fixing a duration in mm:ss entered as a time of day (hh:mm:ss)

    Hi,

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


    But upload the workbook and manually add a sample of the results you want.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: fixing a duration in mm:ss entered as a time of day (hh:mm:ss)

    You could divide the hh:mm time by 60 to convert hours to minutes.

    A1 -- 17:22 (stored in Excel as 0.7236... days)
    B1 -- =A1/60 (Excel result is 0.01206... days), which should yield 0:17:22 when formatted as hh:mm:ss

    If the 17:22:00 entry is a mistake or otherwise not needed, you could also enter 60 into any blank cell -> copy -> paste special -> divide to convert the 17:22:00 to 00:17:22 in place. Or take the result of the B1 formula and copy -> paste special -> as values over the original value.

    Or, if you are not worried about leaving the erroneous 17:22:00 value in the cell, use Richard's formula, which will convert from hours to minutes while it is adding the two date/time serial numbers together.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    01-13-2016
    Location
    Auckland, NZ
    MS-Off Ver
    2013
    Posts
    14

    Re: fixing a duration in mm:ss entered as a time of day (hh:mm:ss)

    with excel sheet attached and the actual outcome I'm working towards! (thanks)

    we use an online 'job sheet' of sorts that provides various details of time based travel jobs.
    The data can be downloaded as n excel sheet, and I want to make some calculations.

    however one column 'D' provides the start time of the job (e.g. 30/11/2018 8:29) and 'E' gives the duration 17:22. the 17:22 is minutes and seconds but is formatted as hh:mm:ss i.e. it thinks that 17:22 is 5:20 PM.
    is there an easy way to convert it to mm:ss? obviously just changing the format is not the solution unfortunately!
    I am wanting to ultimately use the corrected minutes and seconds values to calculate a job cost where the job is valued at 2 x number of minutes + 10 which is the dollar value.

    e.g. 14:37 being 14 minutes 37 seconds would be (14 + 37/60) x 2 + 10 = $24.61 but rounded up to $25.00

    the attached sheet has the desired outcome plus some of the erroneous time fields.

    thanks!

    Theo
    Attached Files Attached Files

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: fixing a duration in mm:ss entered as a time of day (hh:mm:ss)

    Presumably

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


    That said E2 contains the number 1.53 which is 1.53 days. i.e. 36.63 hours, and not 36.63 minutes.

    So whilst the answer is presumably correct you may want to revisit what it is that E2 actually holds if you think it's showing minutes
    Last edited by Richard Buttrey; 12-01-2018 at 06:12 PM.

  6. #6
    Registered User
    Join Date
    01-13-2016
    Location
    Auckland, NZ
    MS-Off Ver
    2013
    Posts
    14

    Re: fixing a duration in mm:ss entered as a time of day (hh:mm:ss)

    I am being a bit thick here- why is the multiplier 48?
    such a simple solution thanks!

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: fixing a duration in mm:ss entered as a time of day (hh:mm:ss)

    Because you said you wanted to multiply by 2 (what you think is) the number of minutes whereas it's the fraction of a day.
    Being a fraction of a day it needs mutiplying by 24 to translate it to the number of hours, and since you want to multiply by 2, then the multiplier is 48

    You can see this if you format the cell to be a number. E2 shows 1.53. i.e. 1.53 days, and E3 contains 0.66 which is .66 of a day or 15.87 hours.

    If the answer is correct then it's just your terminology and what you think column E is actually showing, that is wrong

  8. #8
    Registered User
    Join Date
    01-13-2016
    Location
    Auckland, NZ
    MS-Off Ver
    2013
    Posts
    14

    Re: fixing a duration in mm:ss entered as a time of day (hh:mm:ss)

    yes, I see what you mean- thanks again, works well.

  9. #9
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: fixing a duration in mm:ss entered as a time of day (hh:mm:ss)

    Hi.
    Find attached an approach to what I think you are trying to achieve.
    I have only formatted the first ten rows.
    Columns F,G,H, number format 2 decimal places.
    Columns I,J,L,M, Text format
    Columns K,N, Custom format dd/mm/yyyy hh:mm
    Columns O,Q, Number format zero decimal places
    Column P, Custom format [h]:mm this may not be in your standard selections, you will maybe have to create this.
    Column Q Number format zero decimal places
    Columns K & N are set at zero width (they are 'helper' columns)
    As 'time $ rate' and additional $ charge (surcharge) would be potential variables that altered over time I have taken the fixed values out of the formula and allocated them in the sheet.
    Columns A to F I presume are for reference and did not play apart in the time/cost calcs.
    If this is a labour intensive tedious daily chore it would probably lend itself to UserForm/VBA approach.
    However hope you solve your problem soon.
    regards.
    Torachan.
    Attached Files Attached Files

+ 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: 5
    Last Post: 09-29-2016, 09:58 PM
  2. Replies: 2
    Last Post: 07-14-2015, 02:12 PM
  3. Fixing improperly entered data
    By mike20599 in forum Excel General
    Replies: 7
    Last Post: 03-02-2015, 05:46 PM
  4. [SOLVED] Finding duration between today and the last date entered
    By RJL3313 in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 02-04-2015, 03:25 PM
  5. Calculate duration from start and end time entered
    By famico78 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-02-2014, 06:14 AM
  6. [SOLVED] Split Time Duration to first complete the running hour and then go to End time
    By joogibabu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-06-2013, 10:56 PM
  7. Calculate finish time given start time, working hours and job duration
    By swanseaexcel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2012, 03:00 PM

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