Convert Numbers into Actual Time

Chris Waller

Board Regular
Joined
Jan 18, 2009
Messages
183
Office Version
  1. 365
Platform
  1. Windows
I have a Spreadsheet completed by a colleague who does not understand anything about Excel and I am having to try to sort out a problem caused by a user.

What has happened on several columns which have been formatted as numbers with two decimal places actually represent times for example 10.45 equates to 10 minutes 45 seconds, 0.50 represents fifty seconds, 1.10.50 represents 1 hour 10 minutes and 50 seconds. As there are over 1,200 occurances in 6 seperate columns, does anyone know of a way to easily change these to actual hours, minutes and seconds that they represent without making an absolute hash of the Spreadsheet? TIA</SPAN>
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
maybe if you can add a column and try

=1*SUBSTITUTE(A1,".",":") formatted as time ?
 
Upvote 0
Was going to suggest the same thing, Weazer why did you put the 1* infront of the substitute? I would have just left it =SUBSTITUTE(A1,".",":").
 
Upvote 0
just to convert it back to a number. after substituting, the cell would a number formatted as text so if you needed to do some math it would be an issue. I usually multiply by 1 to get it back to a number but you could also just +0 at the end, then format it as time.

If you didn't need it as a number you could leave it out and just keep it as text I suppose.
 
Upvote 0
Thanks guys for your input, but it didn't actually work. Sorry about that!
 
Upvote 0
maybe if you can add a column and try

=1*SUBSTITUTE(A1,".",":") formatted as time ?

I think this will have a problem with 10.45
Converts to 10:45 which excel will consider 10 Hours and 45 Minutes, not 10 Minutes and 45 Seconds.


Try
=TEXT(SUBSTITUTE(A1,".",""),"00\:00\:00")+0
 
Upvote 0
Thanks for the explanation

just to convert it back to a number. after substituting, the cell would a number formatted as text so if you needed to do some math it would be an issue. I usually multiply by 1 to get it back to a number but you could also just +0 at the end, then format it as time.

If you didn't need it as a number you could leave it out and just keep it as text I suppose.
 
Upvote 0
When formatted the 50 seconds has changed to 5 minutes and the 10 minutes 45 seconds has changed to 10 hours 45 minutes. Perhaps its a case of all those figures that already look like hours need to be treated one way. The ones that look like minutes and seconds another way and the ones that only represent seconds have to be treated a third way. What do you think?
 
Upvote 0
When formatted the 50 seconds has changed to 5 minutes and the 10 minutes 45 seconds has changed to 10 hours 45 minutes. Perhaps its a case of all those figures that already look like hours need to be treated one way. The ones that look like minutes and seconds another way and the ones that only represent seconds have to be treated a third way. What do you think?

See if this formula works for you...

=IF(COUNTIF(A2,"*.*.*"),1*SUBSTITUTE(A2,".",":"),IF(A2="","",1*SUBSTITUTE("0:"&TEXT(A2,"0.00"),".",":")))

Note: You will have to use Cell Format to change the display from a time serial number to the time display format of your choice.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

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