+ Reply to Thread
Results 1 to 10 of 10

hour minutes output not right

  1. #1
    Registered User
    Join Date
    02-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    26

    hour minutes output not right

    Hi,
    the total time on this should be 30 hours and 04 minutes
    but it comes out as looking like 30 hours and 40 minutes
    thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: hour minutes output not right

    Why not just this formula:
    =SUM(A2:D2)
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: hour minutes output not right

    You'll need to format the output to include a leading zero where necessary.

    =DAY(SUM(A2:D2))*24+HOUR(SUM(A2:D2)) & ":" & MINUTE(SUM(A2:D2))

    becomes

    =DAY(SUM(A2:D2))*24+HOUR(SUM(A2:D2)) & ":" & TEXT(MINUTE(SUM(A2:D2)),"00")

    Edit: Popi so right again. Didn't understand formula until pointed that out.

    =TEXT(SUM(A2:D2),"[h]:mm") seems to evaluate what you need.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

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

    Re: hour minutes output not right

    Is there a reason you are converting to a complicated text string rather than simply =sum(A2:D2) formatted as "[h]:mm" (elapsed hours:minutes)?

    To get the text string approach to work, you will need to include a =TEXT() function for the minutes part of the function. =...TEXT(MINUTE(SUM(A2:D2)),"00"), which will force 2 digits in the minute display.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    02-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: hour minutes output not right

    popipipo

    Why not just this formula:
    =SUM(A2:D2)



    that just gives 6:04
    Last edited by mchan; 05-15-2015 at 04:10 PM.

  6. #6
    Registered User
    Join Date
    02-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: hour minutes output not right

    daffodil11

    =TEXT(SUM(A2:D2),"[h]:mm") seems to evaluate what you need.


    thank you that works

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: hour minutes output not right

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Registered User
    Join Date
    02-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: hour minutes output not right

    Quote Originally Posted by MrShorty View Post
    Is there a reason you are converting to a complicated text string rather than simply =sum(A2:D2) formatted as "[h]:mm" (elapsed hours:minutes)?

    To get the text string approach to work, you will need to include a =TEXT() function for the minutes part of the function. =...TEXT(MINUTE(SUM(A2:D2)),"00"), which will force 2 digits in the minute display.
    i had 4 different things running thru my head and the military time and reg 12hr times also i should have stopped and stepped back. was late

  9. #9
    Registered User
    Join Date
    02-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: hour minutes output not right

    Quote Originally Posted by FDibbins View Post
    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    yep, i am aware, i was still in process

  10. #10
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: hour minutes output not right

    that just gives 6:04
    not with celformat [hh]:mm
    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. Average Minutes Per Hour
    By fuller31 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-07-2013, 03:38 AM
  2. Excel 2007 : Rounding up minutes to nearest hour?
    By Belatrix101 in forum Excel General
    Replies: 3
    Last Post: 12-17-2009, 11:16 AM
  3. How can I add some minutes to my current hour?
    By omid020 in forum Excel General
    Replies: 2
    Last Post: 02-24-2009, 08:14 PM
  4. Calculate hour and minutes worked each day
    By Allan in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-19-2005, 06:35 PM
  5. Help with Running Totals for Hour.Minutes
    By Amean1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-22-2005, 09:37 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