Convert Number Format to Proper Seconds

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844
Not too clear on the steps to this, especially in converting in large data-sets.

Lots of "raw" data, has been entered by the main frame as, for example, 0.07 equals seven seconds... that is, it should be 0:00:07 ...

Sounds whacked I know, but thats the data... how do I convert the Number ( which is not a proportional value), from it's stated value, to a straight number value ?


Ta

(y)
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

DRJ

MrExcel MVP
Joined
Feb 17, 2002
Messages
3,853
If A1 has you data then in B1 put

=TIME(0,0,A1*100)

Format as hh:mm:ss
 

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844
Ta.

can this method be applied specifically to a cell ?

(y)
 

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844
Is there anyway that a much wider solution can be used ?
I've got sheets of cells with mixed formats, and changing the 0.07 format to a 0:07 format seems a bit difficult...

Any suggestions please ? Is it simply a matter of replacing the "." and changing it to ":" in the cell ?


Ta

(y)
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
60,886
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

The problem is that if 0.07 is formatted as a number, substituting ":" for "." will not work. However, if we change it to text first, it will, i.e.

=SUBSTITUTE(TEXT(A1,"@"),".",":")
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
60,886
Office Version
  1. 365
Platform
  1. Windows
Or, if you are looking for a method to do it all at once, try this:

Highlight your whole column of time values.
Do a Text-to-Columns, changing their format to Text.
Now do a simple Find and Replace on that column, replacing "." with ":".
 

santeria

Well-known Member
Joined
Oct 7, 2003
Messages
1,844

ADVERTISEMENT

Once again, you are a genius !!!

Yes, this will work.

The trick for me is going to be how to apply this in the style of report I have.
The current Report I am working on is a "test" version.
Once I start doing proper reports, I will likely be doing it to a deadline.

I know it's possible... I ironed out most of the kinks in a Productivity report using some help from your pointers, and also some VERY important macros from Cbrine that were total Life-savers.

I'm trying to apply, learn, and then apply , and learn again, but when the basic report is structurally Flawed, it really gets to be a challenge.

Anyways, I still have a window of time to achieve these tasks.

Onwards, Upwards, and sideways :)

Ta
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,100
Messages
5,768,097
Members
425,453
Latest member
bince

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
Top