View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Convert from seconds to mm:ss within a cell

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



--
Regards,
Tom Ogilvy


"Janet" wrote in message
...
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