Convert from seconds to mm:ss within a cell

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
 
T

Tom Ogilvy

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
 
F

Frank Kabel

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
 
Top