+ Reply to Thread
Results 1 to 18 of 18

Totaling hours in hh:mm format

  1. #1
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Totaling hours in hh:mm format

    Dear all

    On the attached time list report I have converted Seconds (Column G) to Time as hh:mm format (Column H) and I m trying to get total for each day (Column C) on Total Hours (Column I), but some reason date 08/12/2015 total doesn't add up on Colum I, the rest is ok.

    What I noticed if I delete 3 rows on day group 8/12/2015 then it changes the total to correct amount on Colum I.

    Can you please help me why the formula on Colum I doesn't give me correct total if it is more than 12 rows?

    Thank you for your help in advance
    Attached Files Attached Files

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

    Re: Totaling hours in hh:mm format

    You need to apply a custom format in that column of:

    [h]:mm

    where the square brackets prevent the time displays from wrapping at 24 hours - if you do that to your sample then you will see 25:30 in cell I24.

    Hope this helps.

    Pete

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Totaling hours in hh:mm format

    format the column as [h]:mm and it will continue to count hours over 24 hours.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Totaling hours in hh:mm format

    Try the below formula in I4 or change the cell format as [h]:mm
    =IF(COUNTIF(C:C,C4)=COUNTIF(C$1:C4,C4),TEXT(SUMIF(C:C,C4,H:H),"[H]:MM"),"")
    Please Login or Register  to view this content.
    Press Ctrl+1 > Number > select time under category > select 37:30:55 (or similar type) uner type press ok
    or
    Press Ctrl+1 > Number > select custom under category > then enter/type [h]:mm under type and press ok
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Totaling hours in hh:mm format

    thank you very much guys all 3 answers were corrected the problem. You all are stars
    kind regards

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

    Re: Totaling hours in hh:mm format

    Glad to help.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  7. #7
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Totaling hours in hh:mm format

    One more problem, why if the hours minus and plus doesn't give correct total, for example -06:00 + 06:00 = should be 00:00 but it doesn't total correctly.
    do you know why?

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Totaling hours in hh:mm format

    Can uou post a sheet showing that problem. It is probably because you have had to apply special formatting to get the negative times to look like times. Excel doesn't like negative times when the 1900 date format is used (standard for PCs).

  9. #9
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Totaling hours in hh:mm format

    here is the excel sheet. On 02/12/2015 at 5. row has a minus entry but it doesn't taken off the group total by formula.
    Attached Files Attached Files

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Totaling hours in hh:mm format

    Yes; it is because what you have is NOT a time; but text that LOOKS like a time. As I said at the start of a previous thread of yours, the 1900 dating system used by Excel on PCs by default does not handle negative time. I suggested that you switch to using the 1904 dating method; which does handle negative time. I then thought that you wnated something that LOOKS like negative time and that is what I gave you. But it is text, not time. You did not say that you wanted to use that "figure" in subsequent calculations. I therefore comeback to my original suggestion - that you should consider adoting the 1904 system for this spreadsheet - (bearing in mind that you will need to re-enter all existing dates when you swap over).

  11. #11
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Totaling hours in hh:mm format

    Thank you Glenn , I don't think I will do the switch as it will change all my aged debt differences. Maybe what I need is manually delete minus entries with matching entries

    kind regards

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Totaling hours in hh:mm format

    There is a way round that.... base your calculation on the hidden column. Put this in H28:

    =SUBTOTAL(109,[QuantityOfTime])/86400

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

    Re: Totaling hours in hh:mm format

    You can use this formula in I4:

    =IF(COUNTIF(C:C,C4)=COUNTIF(C$1:C4,C4),SUMIF(C:C,C4,G:G)/86400,"")

    then you don't need to delete -ve entries and matching +ve ones.

    Hope this helps.

    Pete

  14. #14
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Totaling hours in hh:mm format

    general subtotal is not big deal I am trying to get daily subtotals correctly. Daily total should be 5:30 but it says 5:42 for 02/12/2015
    Last edited by lapot; 12-16-2015 at 12:40 PM.

  15. #15
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Totaling hours in hh:mm format

    This has worked, thank you very much once again Pete_UK

    Quote Originally Posted by Pete_UK View Post
    You can use this formula in I4:

    =IF(COUNTIF(C:C,C4)=COUNTIF(C$1:C4,C4),SUMIF(C:C,C4,G:G)/86400,"")

    then you don't need to delete -ve entries and matching +ve ones.

    Hope this helps.

    Pete

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

    Re: Totaling hours in hh:mm format

    That's the total that you get if you change to my formula in Post #13, as it is acting directly on the seconds in column G.

    Pete

    EDIT: Ah, we crossed in the post.

    Pete

  17. #17
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: Totaling hours in hh:mm format

    thank you very much again

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

    Re: Totaling hours in hh:mm format

    You're welcome.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Pete

+ 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. Totaling Hours in Standard Format
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 09-06-2005, 07:05 PM
  2. Totaling Hours in Standard Format
    By Coco in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  3. [SOLVED] Totaling Hours in Standard Format
    By Coco in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  4. [SOLVED] Totaling Hours in Standard Format
    By Coco in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. [SOLVED] Totaling Hours in Standard Format
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 07:05 AM
  6. [SOLVED] Totaling Hours in Standard Format
    By Coco in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. Totaling Hours in Standard Format
    By Coco in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  8. Totaling Hours in Standard Format
    By Coco in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

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