Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hello
Is there any way to convert the following numbers to show as hrs:min without manually insterting a colon? e.g.15:45 18:40 1545 1840 2015 2300 2045 2105 1700 1815 1825 1840 1850 2000 1835 1900 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Select the cells you want to convert and run this little macro:
Sub marine() Dim hrs As Integer, mins As Integer For Each r In Selection v = r.Value hrs = Left(v, 2) mins = Right(v, 2) r.Clear r.NumberFormat = "hh:mm" r.Value = TimeSerial(hrs, mins, 0) Next End Sub -- Gary''s Student - gsnu201003 "da" wrote: hello Is there any way to convert the following numbers to show as hrs:min without manually insterting a colon? e.g.15:45 18:40 1545 1840 2015 2300 2045 2105 1700 1815 1825 1840 1850 2000 1835 1900 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you for your suggestion. I am not good at runnung macros.
But I found another formula that worked. "Gary''s Student" wrote: Select the cells you want to convert and run this little macro: Sub marine() Dim hrs As Integer, mins As Integer For Each r In Selection v = r.Value hrs = Left(v, 2) mins = Right(v, 2) r.Clear r.NumberFormat = "hh:mm" r.Value = TimeSerial(hrs, mins, 0) Next End Sub -- Gary''s Student - gsnu201003 "da" wrote: hello Is there any way to convert the following numbers to show as hrs:min without manually insterting a colon? e.g.15:45 18:40 1545 1840 2015 2300 2045 2105 1700 1815 1825 1840 1850 2000 1835 1900 |
#4
![]() |
|||
|
|||
![]() Quote:
=(Left(A1,2)&":"&Right(A1,2))*1 Then format the cell as Time with 13:30 format |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can the "convert" function in excel convert to UK gallons? | Excel Discussion (Misc queries) | |||
how will i convert 05.01.2007 convert 05.Jan.2007 format? | New Users to Excel | |||
convert value in word. For Exampe Rs.115.00 convert into word as . | Excel Discussion (Misc queries) | |||
convert decimal number to time : convert 1,59 (minutes, dec) to m | Excel Discussion (Misc queries) | |||
Convert Time...!convert tenths of a second | Excel Discussion (Misc queries) |