Subscribe for Weekly Tutorials
BONUS: subscribe now to download our Top Tutorials Ebook!
Change Minutes from a Decimal to a Percentage of an Hour
Change minutes stored as a decimal into a fraction of an hour. For instance, if time is stored as 8.15, 8 hours and 15 minutes, this is not very helpful when performing calculations such as a costing analysis; it is better to have the time converted to 8.25, or 8 hours and 25% of one hour. With the new number, you can multiple it by, for instance, an hourly rate to get how much to charge for something.
This tutorial assumes that a person or program stored time in the format stated above. Excel does not store time this way by default.
Formula
A simple formula like this will convert the time:
=TRUNC(A1)+(A1-TRUNC(A1))*1.66666667
This assumes that the time is in cell A1.
This formula is not too complex, it chops off the integer portion of the number using the TRUNC() function and then multiplies the decimal amount by 1.66666667 in order to convert the minute amount to a percentage of an hour amount; then, the formula puts the new number back with the integer.
Here it is in Excel:
That returns:
15 minutes is 25% of one hour and that is why 8.15 becomes 8.25.
Notes
This tutorial has nothing to do with how Excel stores times. This applies to a situation where a time was entered in the above format by a person or another program.
Download the attached file to work with this example in Excel.
Question? Ask it in our Excel Forum
Tutorial: How to make a user input form in Excel and have the data stored on another worksheet at th...
Tutorial: How to run a macro when a user does something within the Workbook in Excel, such as openi...
Tutorial: This is a practical guide to using Variables in Macros and VBA for Excel. I will tell you ...
Tutorial: How to fill a Listbox with values in a UserForm. By default, a Listbox in a form will be e...
Tutorial: How to get data from a UserForm in Excel, including from: text inputs (TextBox), list boxe...
Tutorial: How to quickly delete all empty cells or rows from a range in Excel. This allows you to ...