Convert Decimal to Time

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,551
Office Version
  1. 365
Platform
  1. Windows
I track paid time off using regular numbers (208.25) but we switched to ADP and now, we have to use time formats instead so 208.25 has to be come 208:15 and 208.75 has to become 208.45. I tried changing my cell formats to "h:mm" but that changes 208.25 to 6:00.

What am I doing wrong?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
How about
+Fluff v2.xlsm
EF
1
2208.25208:15
3208.75208:45
4208.5208:30
Main
Cell Formulas
RangeFormula
F2:F4F2=E2/24

and format to [h]:mm
 
Upvote 0
In formula terms, 208.25 is evaluated as days, not hours .25 days is 6 hours.

To convert decimal time to proper, you need to divide by 24 and format the result as [h]:mm
 
Upvote 0
Did you format the cell as we said?
 
Upvote 0
If it is showing as 16:00 then it implies that the square brackets are missing from the format. e.g. that you have used h:mm not [h]:mm
 
Upvote 0
Ok, I did not know I had to add the brackets.

It is working now but it is messing up my calculation cells. I am entering data into an attendance card so when someone takes a PTO day, I would enter 8 and this formula would calculate the employee's remaining time:

=AI3-SUM(AI6:AK17)+INT((TODAY()-DATE(2021,1,4-7))/7)*2.47

The formula worked when I used decimals but it will not work now that I have switched to time formatting. The purpose of the formula is to calculate the employee's remaining time and add 2:47 hours every Sunday as we earn 2:47 hours every week.
 
Upvote 0
You still have 2.47 in the formula, not 2:47. Changing should solve the problem, but that depends on how AI3 and AI6:AK17 affect the calculations.
Excel Formula:
=AI3-SUM(AI6:AK17)+INT((TODAY()-DATE(2021,1,4-7))/7)*"2:47"
Note that in this instance the time is enclosed in double quotes.
 
Upvote 0

Forum statistics

Threads
1,214,400
Messages
6,119,288
Members
448,885
Latest member
LokiSonic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top