+ Reply to Thread
Results 1 to 6 of 6

Convert Hours to Days and Hours

  1. #1
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Convert Hours to Days and Hours

    Hello,

    I'm trying to design a quick calculator for taking a number of hours and converting it to two separate numbers to reflect the equivalent days and hours.

    C5 should show only the amount of days.
    C6 should show any remaining hours.

    The supplementation hours needs to be divided by the number in D4.

    Can this be done?
    Attached Files Attached Files

  2. #2
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    200

    Re: Convert Hours to Days and Hours

    Hi JennOlsen!

    PHP Code: 
    [C5] : INT(D2/D4)
    [
    C6] : =D2-C5*D4 
    Blessings!
    A out-of-context text is a pretext.
    Consider adding reputation points to all the people who help you with your question/problem.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,410

    Re: Convert Hours to Days and Hours

    For days use this.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    for Supplemental hours I don't understand the rational for the "The supplementation hours needs to be divided by the number in D4." part.

    What it looks like you want will be returned by rounding up like this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  4. #4
    Forum Contributor
    Join Date
    11-13-2013
    Location
    California
    MS-Off Ver
    Excel 365 Apps for enterprise
    Posts
    180

    Re: Convert Hours to Days and Hours

    Hi. I'm calculating "work days/hours", and some people do not work a full day, so to convert it, I need it to be full day equivalents based on the number of hours they work. Not a 24 hour period or a standard 8 hour work day. The hours can be up to one decimal point. So 2.4 would be correct in my sample.

    EDIT: I think having the formula for the Days, I can use a simple sum calc to get the hours remaining.
    Last edited by JennOlsen; 05-05-2023 at 01:57 PM.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,757

    Re: Convert Hours to Days and Hours

    The actual number of hours in D2 is 91.91, so your sample result is incorrect. Do you want to round this number to the nearest hour? Round it up to the next highest hour? Not round at all?

    Attached are solutions for all.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,410

    Re: Convert Hours to Days and Hours

    Quote Originally Posted by JennOlsen View Post
    ...........
    EDIT: I think having the formula for the Days, I can use a simple sum calc to get the hours remaining.
    Please share the formula you used. BTW thank you for marking your thread 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] Convert hours to Years, Months, Weeks, Days and Hours
    By jomili in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2022, 02:13 PM
  2. [SOLVED] Convert text Days, hours, minutes to total hours.
    By Hyperion1571 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-02-2021, 04:06 PM
  3. [SOLVED] Convert Days Hours and Minutes to decimal days
    By david1987 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-06-2015, 05:44 PM
  4. [SOLVED] Function or macro to convert string with weeks, days, hours, minutes to Hours
    By kknb0800 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2012, 11:35 AM
  5. Convert days -> Years, Months, Days, Hours, Minutes, Seconds
    By brharrii in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-06-2012, 06:44 PM
  6. [SOLVED] Convert days in decimal to days:hours:minutes
    By Todd F. in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-16-2006, 03:25 PM
  7. Convert decimal days to Days,hours, minutes
    By Todd F. in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2006, 11:45 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