Convert from seconds to mm:ss within a cell

  • Thread starter Thread starter Janet
  • Start date Start date
J

Janet

Hi, I need help.

trying to convert seconds i.e. 127 to read 2:07 while
still in the same cell.

Anyone know how to do this or even if it is possible
without writing VB code? TX
 
There is no formatting that will display the number 127 as 2:07. If you use
another cell you can divide 127/(60*60*24)

and format as Time.


if you mean a macro

Sub Tester1()
ActiveCell.Value = ActiveCell.Value / (60# * 60# * 24#)
ActiveCell.NumberFormat = "mm:ss"
End Sub
 
Hi
without VBA this is not possible within the same cell. ne
workaround: Use a helper column with the formula
=A1/(24*60)
and format this cell as time
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top