Converting Number to Time Format

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,557
Office Version
  1. 365
Platform
  1. Windows
I have a worksheet with 747 rows of data. In column E, starting with E3, are times that have been converted to numbers (e.g., 11:00 is 11.00). I need to convert all the numbers to times but when I try TEXT, I get the wrong result. In E3 is 11.00 and when I apply =TEXT(E3,"H:MM"), I get 0:00. When I apply the same formula to 10.50, I get 12:00. I cannot figure out how to fix this.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
the decimal says to the system, the bit to the left is whole days. there is a way of doing it

On a COPY do a find replace . to : and see if that makes it work
 
Upvote 0
Find and replace did not work. All nu ber with a decimal stayed that way but numbers like 10.50 became 0.42.
 
Upvote 0
If 10.5 is supposed to be 10:30 then all you have to do is divide by 24
Format result cells as time:


Excel 2010
AB
111.0011:00 AM
210.5010:30 AM
Sheet1
Cell Formulas
RangeFormula
B1=A1/24
B2=A2/24


If however 10.50 is supposed to be 10:50 AM, then perhaps:
=SUBSTITUTE(A1,".",":")+0
Format as time.


Excel 2010
AB
111.0011:00 AM
210.5010:50 AM
Sheet1
Cell Formulas
RangeFormula
B1=SUBSTITUTE(A1,".",":")+0
B2=SUBSTITUTE(A2,".",":")+0
 
Upvote 0
try
Excel 2010
EF
211.0011:00 AM
310.5010:30 AM
4

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
3a

Worksheet Formulas
CellFormula
F2=TIME(INT(E2),MOD(E2,1)*60,0)
F3=TIME(INT(E3),MOD(E3,1)*60,0)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

That works! Thank you.
 
Upvote 0
If 10.5 is supposed to be 10:30 then all you have to do is divide by 24
Format result cells as time:

Excel 2010
AB
111.0011:00 AM
210.5010:30 AM

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B1=A1/24
B2=A2/24

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



If however 10.50 is supposed to be 10:50 AM, then perhaps:
=SUBSTITUTE(A1,".",":")+0
Format as time.

Excel 2010
AB
111.0011:00 AM
210.5010:50 AM

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B1=SUBSTITUTE(A1,".",":")+0
B2=SUBSTITUTE(A2,".",":")+0

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Yes, 10.50 is supposed to be 10:30 but both your solutions worked. I did not even think about dividing by 24, which is the easiest solution.

Thank you.
 
Upvote 0

Forum statistics

Threads
1,215,563
Messages
6,125,565
Members
449,237
Latest member
Chase S

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