+ Reply to Thread
Results 1 to 14 of 14

How to add minutes and seconds together

  1. #1
    Registered User
    Join Date
    02-21-2024
    Location
    Middx UK
    MS-Off Ver
    2003
    Posts
    68

    How to add minutes and seconds together

    In column I in my worksheet I have a list of timings in minutes and seconds.

    These are transferred by formula to C and added together in E in a running total in Mins:Secs. In F these are then displayed in Hrs: Mins:Secs.

    This works well to a point , but falls down when larger numbers are input into I. Anything over 24 minutes in fact. I do know whey this is , but despite my best efforts , I can't get the formatting correct to include minutes and seconds up to 60:00 without running into trouble. I thought I'd ask here as a fresh pair of eyes may see a way through.

    I recognise that some of the current formatting in the attached file is there only because it works up to a point (<24:00) rather than for it's logical purity.

    I'd be grateful if anyone can see a way to get the formatting in E and F displaying correctly. I've attached a sample file. Enter any timing in I over 24 in mm:ss format to see the effect.

    Thanks in advance.
    Attached Files Attached Files
    Last edited by CaMeSuffit; 02-22-2024 at 11:30 PM.
    Currently using Access , Word and Excel 2003

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,432

    Re: How to add minutes and seconds together

    I notice that the values entered in column I are in hours:minutes and not minutes:seconds and that column I is formatted as time of day. Of course, a day is only 24 hours, so any value larger than a day (24 hours, which you are wanting to treat as 24 minutes) is not displayed correctly. Is there a reason you prefer to enter the values as hours:minutes rather than minutes:seconds?

    I notice that your sample does not include any time values larger than 24 hours (24 minutes). Can you explain what goes wrong (other than an incorrect display) when you enter a value larger than 24 hours in column I? It seems to work correctly when I enter a value larger than 24 hours in column I.

    The main solution I see is to enter the values as minutes:seconds in column I (which usually means you need to include the hours placeholder during data entry 0:5:17 for example). Then make sure to format the values and sums as elapsed minute as you are currently doing in E and F.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    02-21-2024
    Location
    Middx UK
    MS-Off Ver
    2003
    Posts
    68

    Re: How to add minutes and seconds together

    MrShorty - thanks you for your advice. I agree the formatting needs attention to produce more consistent results. I think when I was setting this up I happened upon a format structure which seems to produce correct output. I do realise that once over 24 it fails , for the reasons you identify. I'm really trying to have it produce the same format of output when the timings over 24 are used.

    As an example , presently if I enter 42:10 (mm:ss) into I23 it shows 00:18 as a result. I'm struggling to have all the columns reflect the format I'm searching for because a single change seems to throw them all out. I'm clear on what I'm trying to do , but can't find the correct logic in terms of the format balance to make it work. At the moment at least.
    Last edited by CaMeSuffit; 02-23-2024 at 01:08 AM.

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: How to add minutes and seconds together

    I'd be grateful if anyone can see a way to get the formatting in E and F displaying correctly
    What is the correct format then? I only see formulas, but nowhere manually entered the expected results. Please add some of these to your sheet.

  5. #5
    Registered User
    Join Date
    02-21-2024
    Location
    Middx UK
    MS-Off Ver
    2003
    Posts
    68

    Re: How to add minutes and seconds together

    Sorry if that wasn't clear. The display of the results in E should be mm:ss and in F hh:mm:ss. This is as displayed in the sample file.

    The issue is with taking into account timings above 24 in I.

    If you manually enter a timing into I below 24 it will be successfully accounted for in D , E and F. If you enter a timing in I above 24 then it isn't reflected correctly.

    I appreciate the formatting is not accurate somewhere in the sheet , and I'm struggling to get accurate running total with timings above 24. This is the reason for my post.

    Thanks for your help.
    Last edited by CaMeSuffit; 02-23-2024 at 08:38 AM.

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

    Re: How to add minutes and seconds together

    Quote Originally Posted by CaMeSuffit View Post
    ... if I enter 42:10 (mm:ss) into I23 ...
    If you want to enter a time which only has minutes and seconds, then you have to enter it as h:mm:ss, i.e. in this case you should enter it as 0:42:10. Similarly, if the time only has seconds (e.g. 30 seconds), you should enter this as 0:0:30.

    If you enter 42:10 then Excel will take this as 42 hrs and 10 minutes, and then because the time will wrap at 24 hours it will display 18:10 (meaning 18 hrs and 10 minutes). If you want to see more than 24 hours, you should apply a custom format of [h]:mm, where the square brackets prevents the hours wrapping at 24.

    It might be better to format as [h]:mm:ss so there is less ambiguity in what is required.

    Hope this helps.

    Pete

  7. #7
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: How to add minutes and seconds together

    maybe your format column I as hrs and minutes (we know it it too high by a factor of 60)

    C6
    =IF($I6="","",$I6/60) and format [mm]:ss

    then get rid of the /60 in columns F and G

    I agree it is a little ambiguous

  8. #8
    Registered User
    Join Date
    02-21-2024
    Location
    Middx UK
    MS-Off Ver
    2003
    Posts
    68

    Re: How to add minutes and seconds together

    Thanks Pete_UK. Yes , that's helpful. I can see the logic.

    Presently the timings in I are entered remotely in the form 42:10:00. I'll need to find a formula to change these to 00:42:10.

  9. #9
    Registered User
    Join Date
    02-21-2024
    Location
    Middx UK
    MS-Off Ver
    2003
    Posts
    68

    Re: How to add minutes and seconds together

    davsth - yes , that does work. It accommodates for the issue in I.

    If I enter for example 42:10 in I23 then it displays as 18:10. With your amendments in place , it is reflected in C, E & F as 42:10 , so gives a correct calculation.

    With a reformat of the display in I , this will solve the issue I think..

  10. #10
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: How to add minutes and seconds together

    All dates and times are a number of days since I think jan 1900 but the important thing is that say 12 hours is 0.5 of day, so 12 minutes is a 60th of this, hence the divide by 60 to convert to minutes. the format is just a way of displaying these numbers

  11. #11
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: How to add minutes and seconds together

    Thanks for the feedback and rep. .

    The issue is with taking into account timings above 24 in I.
    In your example there were no times above 24:00 in column I.

    And I don't see errors in column E.
    I see only errors in column I: Solution: Please custom format column I: [hh]:mm
    And in column F: Solution: Please custom format column F: [h]:mm:ss

    See sample file and see post #6 of Pete Also.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    02-21-2024
    Location
    Middx UK
    MS-Off Ver
    2003
    Posts
    68

    Re: How to add minutes and seconds together

    Thanks HansDouwe. That's working.

    BTW , you are correct there were no times above 24:00 in column I in the example , but if you enter any number above 24:00 into I then you will see the issue.

  13. #13
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: How to add minutes and seconds together

    You are Welcome!

    Thanks for the feedback and glad to have helped .

  14. #14
    Registered User
    Join Date
    02-21-2024
    Location
    Middx UK
    MS-Off Ver
    2003
    Posts
    68

    Re: How to add minutes and seconds together

    Thanks guys for your time and expertise. Problem solved.

+ 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] Adding minutes and seconds
    By CDandVinyl in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-29-2023, 10:54 PM
  2. Adding a column of minutes and seconds mm:ss
    By Squint in forum Excel General
    Replies: 4
    Last Post: 08-10-2020, 02:36 PM
  3. [SOLVED] Adding Minutes/Seconds to SMPTE Timecode
    By tdcist in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-19-2020, 11:28 AM
  4. Adding Time, Minutes & Seconds
    By critter4511 in forum Excel General
    Replies: 6
    Last Post: 04-03-2012, 06:41 PM
  5. Adding Minutes:Seconds
    By jayduerrmusic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2008, 05:31 PM
  6. Adding hours minutes and seconds
    By WannaChevy03 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-01-2006, 10:45 AM
  7. [SOLVED] Adding minutes &amp; seconds
    By Emily16 in forum Excel General
    Replies: 5
    Last Post: 10-13-2005, 05:05 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