+ Reply to Thread
Results 1 to 9 of 9

Trouble pulling out hours when sum exceeds 24 hrs

  1. #1
    Registered User
    Join Date
    09-16-2008
    Location
    Cleveland, OH
    Posts
    7

    Thumbs up Trouble pulling out hours when sum exceeds 24 hrs

    There is probably a simple solution to my problem that I am just not seeing because I cannot believe I'm the only one trying to pull out the number of hours after summing a column of times when the total exceeds 24 hrs. I have attached a sample spreadsheet which has columns for start time, end time and time used (ie end - start time) Originally when I totalled the column of time used, I got 20:27 hrs instead of the correct 44:27 hrs. After doing some research I found out that I had to create a custom format of [h]:mm to get it show beyond 24 hrs. However, now that I can see the 44 hrs and 27 min as 44:27, I cannot seem to pull out the 44 hrs to use it in a calculation of multiplying total time against a charging rate ($/hr) to get a total cost in $. The sum using [h]:mm is in cell F68 and I was hoping to convert this [h]:mm into a number of hrs as a decimal (ie 44:27 to 44.45 hr) by =((HOUR(F68)+MINUTE(F68)/60)) but I get back to the 20 hrs of a h:mm format.

    I was originally surprised that I couldn't sum a column of times and get the total time without creating a special format. But I am really surprised that it isn't intuitive to pull out the correct number of hours when it exceeds 24 hrs. I am sure that it's simple because it seems something that a lot of people would have going on in accounting type of spreadsheets. I am going to be doing a lot of summing times coming up and would appreciate suggestions. This forum helped me once before and I hope for the same results!

    Thanks!
    Attached Files Attached Files
    Last edited by Steelman; 07-08-2009 at 07:56 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Trouble pulling out hours when sum exceeds 24 hrs

    Format the cell as [h]:mm or [hh]:mm
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-16-2008
    Location
    Cleveland, OH
    Posts
    7

    Re: Trouble pulling out hours when sum exceeds 24 hrs

    Using the [h]:mm format works in cell F68 for =SUM(F2:F62) when it gives me 44:27 vs the 20:27 from a h:mm format. But I am trying to pull out the 44 hrs and use it in a calculation in cell F72 but it uses 20 instead of the 44. Am I missing something?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Trouble pulling out hours when sum exceeds 24 hrs

    I don't know; what's the calculation?

  5. #5
    Registered User
    Join Date
    09-16-2008
    Location
    Cleveland, OH
    Posts
    7

    Re: Trouble pulling out hours when sum exceeds 24 hrs

    I have an attached spreadsheet and in cell F72 I was trying to convert the correct 44:27 (44 hrs and 27 min) sum from cell F68 using [h]:mm into a decimal. The first formula in cell F72 is =((HOUR(F68)+(MINUTE(F68)/60)) which I hoped would convert the 44:27 into 44.45 but it gives me 20.45. It converts the 27 min into .45 like it should but it still picks up the 20 hrs from a h:mm format vs the 44 hrs which cell F68 shows because it is fomated to [h]:mm. Eventually I want to take this total time exceeding 24 hrs and multiple it against the charging rate on $10/hr in cell F74 and show it in cell cell F75 by F72*F74 to get $444.50 (ie 44.45*10) but I get $204.50 from it picking up 20 hr reverting to the h:mm format even thou cell F68 shows 44:27. I can see the 44 hrs but when I try to pull it out - it seems like I always get 20. How can I pull out and use the 44 hrs?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Trouble pulling out hours when sum exceeds 24 hrs

    You're working way too hard.

    To convert 44:27 to 44.45, just multiply by 24 and format as General.

  7. #7
    Registered User
    Join Date
    09-16-2008
    Location
    Cleveland, OH
    Posts
    7

    Re: Trouble pulling out hours when sum exceeds 24 hrs

    THANK-YOU! I knew it had to be simple. Not sure why it works but it sure does! Again Thanks!

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Trouble pulling out hours when sum exceeds 24 hrs

    In Excel date/times, days are whole numbers (since 0 Jan 1900) and the time is the decimal part. So multiply days times 24 and you get ... (drum roll) ... hours.

  9. #9
    Registered User
    Join Date
    09-16-2008
    Location
    Cleveland, OH
    Posts
    7

    Re: Trouble pulling out hours when sum exceeds 24 hrs

    Thanks again for the solution and now the explaination of why it works!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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