How can I convert hours in time format to days in decimal format

Sonja Porter 0 Reputation points
2024-07-18T21:58:01.5233333+00:00

Hello

I run a table in excel to calculate the hours I work for each client. I enter the start and end time in format hh:mm. This calculates the number of hours worked on that project each day into a total which is formatted in the cell as Time. This column is then totalled at the bottom of the table with a custom Format Cells of [h]:mm;@ because they frequently exceed 24 hours in a billing period.

How can I convert this total number of hours to a decimal number of days ie 50:00 hours into 50.0 hours so I can then calculate it on into working days (ie 7.5 hours in a working day)?

I think I am using the wrong Format Cells option but I can't work out what it should be or the formula to use.

Any help would be gratefully received!

Thank you!

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,874 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Barry Schwarz 2,826 Reputation points
    2024-07-19T01:42:45.0466667+00:00

    The system stores all time values as the decimal part of a day. The format you to display this data doesn't change this fact. You may think the cell contains 8AM but if you select the cell and change the format to General, you will see the actual value 0.333333. (Even that is not the actual contents., The system stores number as floating point values in binary.)

    So leave the format for the start time, end time, and duration as a convenient time format for ease of reading. In the cell where you sum the durations, change the format to General or Number with an appropriate number of decimal places. This will yield the number of 24-hour days worked. Then simply multiply by 24 to get the hours worked and divide by the number of work hours in a day to get the number of days you should be paid for.

    This is my sample:User's image

    0 comments No comments

  2. Jiajing Hua-MFST 9,760 Reputation points Microsoft Vendor
    2024-07-19T02:06:09.5933333+00:00

    Hi @Sonja Porter

    You may use the formula, be like =TEXT(total number,"[h]")+MINUTE(total number)/60.

    enter image description here


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.