+ Reply to Thread
Results 1 to 11 of 11

Converting hours in days

  1. #1
    Forum Contributor
    Join Date
    03-31-2012
    Location
    Sao Paulo
    MS-Off Ver
    Excel 2021
    Posts
    161

    Converting hours in days

    I need to convert hours into days, ie, number of hours in a given month, for 8-hour days.
    Thanks ...

    Leo Villa

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Converting hours in days

    Hello Leovilla, can you give an example, what data do you have and what is the required result?
    Audere est facere

  3. #3
    Forum Contributor
    Join Date
    03-31-2012
    Location
    Sao Paulo
    MS-Off Ver
    Excel 2021
    Posts
    161

    Re: Converting hours in days

    I have 254:00:00 hours, I turn into 8-hour days, which would give around 32 days.
    Using this formula, the more it is accepted only up to 251 hours
    =INT(24*E71/8)+E71-8*INT(24*E71/8)/24

    Thanks
    Leo

  4. #4
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Converting hours in days

    Please Login or Register  to view this content.
    With formatting:
    Please Login or Register  to view this content.
    Or:
    Please Login or Register  to view this content.
    Last edited by HSV; 10-18-2012 at 04:36 PM.
    Kind regards, Harry.

  5. #5
    Forum Contributor
    Join Date
    03-31-2012
    Location
    Sao Paulo
    MS-Off Ver
    Excel 2021
    Posts
    161

    Re: Converting hours in days

    The problem is that from 256:00:00 hours formula is not working, to calculate the days, that's where I am not able to adjust. Okei

    grateful

  6. #6
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Converting hours in days

    The formula works fine to me.
    264:00:00 returns into 33.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Converting hours in days

    If you are just using HSV's formula =A1/8 *24, you will need to format the cell to General (or use the custom format that HSV suggested). Otherwise Excel will automatically use the same format as A1 ([h]:mm:ss) which you don't want.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Converting hours in days

    I think the problem is with that custom format - d format never displays more than 31 (because dd or d format is based on day of the month rather than elapsed days - and there's no [d] option for days) so you need to format as general to see 31.75 for 254:00 (using HSV's suggested formula) - If you want to see days and hours like 31d 06:00 try this version

    =INT(E71/"8:00")&"d "&TEXT(MOD(E71,"8:00"),"hh:mm")
    Last edited by daddylonglegs; 10-18-2012 at 05:47 PM.

  9. #9
    Forum Contributor
    Join Date
    03-31-2012
    Location
    Sao Paulo
    MS-Off Ver
    Excel 2021
    Posts
    161

    Re: Converting hours in days

    Not abusing your patience of all, how would
    you put in a spreadsheet, I'm picking to make
    it work. Thank you.

    Leo

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Converting hours in days

    See example attached
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    03-31-2012
    Location
    Sao Paulo
    MS-Off Ver
    Excel 2021
    Posts
    161

    Re: Converting hours in days

    Thank you for your attention, it worked perfectly, I have other questions, I will create new threads, I hope your help ...

    I hope you understand my English because I am Brazilian, okay

+ 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