Convert Decimal to Time

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,557
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?
 
I left 2.47 in there to show you what I was doing before today.

I changed to your formula but my result is 216:21 instead of 208:00. I am trying to use MrExcel but it keeps crashing Excel when I try to generate output.
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Attendance Cards - 2021.xlsm
AIAJAK
3208:00
4
5Used PTO
60:00
78:00
8 
9 
100:00
11 
120:00
13 
140:00
15 
160:00
170:00
180.333333
19Remaining Package Balance
20PTO
21208:21
Cruz, Renilio
Cell Formulas
RangeFormula
AI3AI3=208/24
AI6:AI17AI6=IFERROR(IF(COUNTA(C6:AG6)=0,"",IF(COUNTIF(C6:AG6,"?*"),SUM(IF(LEFT(C6:AG6&"|",4)="PTO|",8,IF(1-(C6:AG6=""),IF(LEFT(C6:AG6,3)="PTO",REPLACE(C6:AG6,1,3,"")+0))))))/24,"")
AI18AI18=SUM(AI6:AI17)
AI21AI21=AI3-SUM(AI6:AK17)+INT((TODAY()-DATE(2021,1,4-7))/7)*"2:47"
 
Upvote 0
I'm not seeing how you're arriving at the expected result. You have 208 at the top, but then you're adding and subtracting bits which are changing that value at the bottom.

Can you post an example with the correct results using your original method of decimal times in all cells? e.g. 208 in the top cell rather than 208/24.
 
Upvote 0
Sorry, here is my original data using decimals:

Attendance Cards - 2021.xlsm
AIAJAK
11/1/21 Starting Balance
2PTO
3362
4
5Used PTO
68
7 
8 
9 
100
11 
120
13 
140
15 
160
170
188
19Remaining Package Balance
20PTO
21364.5
Yoro, Severino
Cell Formulas
RangeFormula
AI6:AI17AI6=IF(COUNTA(C6:AG6)=0,"",IF(COUNTIF(C6:AG6,"?*"),SUM(IF(LEFT(C6:AG6&"|",4)="PTO|",8,IF(1-(C6:AG6=""),IF(LEFT(C6:AG6,3)="PTO",REPLACE(C6:AG6,1,3,"")+0))))))
AI18AI18=SUM(AI6:AI17)
AI21AI21=AI3-SUM(AI6:AK17)+INT((TODAY()-DATE(2021,1,1-7))/7)*3.5
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
I had a bit of a brainfart in my earlier suggestion, 2.47 and "2:47" are not the same thing, not entirely sure what I was thinking there, or even if I was thinking at all.
Based on post 14, see if this helps
Book1(AutoRecovered)2.xlsm
AIAJAK
3362:00
4
5Used PTO
60:00
78:00
8
9
100:00
11
120:00
13
140:00
15
160:00
170:00
188:00
19Remaining Package Balance
20PTO
21364:30
Sheet4
Cell Formulas
RangeFormula
AI3AI3=362/24
AI18AI18=SUM(AI6:AI17)
AI21AI21=AI3-SUM(AI6:AK17)+INT((TODAY()-DATE(2021,1,1-7))/7)*(3.5/24)
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,040
Members
449,063
Latest member
ak94

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