Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, Is it possible to convert a time to text Example : 12:20:00 --- 12 h 20 (texte format) I know the procedure =TEXT ... Is there something but in vba? Thanks for your help. Yves |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to convert a time to text
Example : 12:20:00 --- 12 h 20 (texte format) I know the procedure =TEXT ... Is there something but in vba? You can use the Format function in VBA... YourTimeValue = #12:20:00# MsgBox Format(YourTimeValue, "h \h mm") Rick Rothstein (MVP - Excel) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"If" wrote:
Is it possible to convert a time to text Example : 12:20:00 --- 12 h 20 (texte format) I know the procedure =TEXT ... Is there something but in vba? The VBA Format function is similar to the Excel TEXT function. For example: Const d As Double = #12:20:00 PM# MsgBox Format(d, "h \h m") If 12:20:00 is in A1 (formatted any way you wish), you could also do: =TEXT(A1, "h \h m") And you can do: =A1 with the Custom format "h \h m" without quotes. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert time to text | Excel Worksheet Functions | |||
How do I convert time as text 'mm:ss to time value in Excel | Excel Discussion (Misc queries) | |||
convert time to text | Excel Discussion (Misc queries) | |||
Convert Text Time to Excel Time | Excel Discussion (Misc queries) | |||
convert time imported as text to time format for calculations | Excel Worksheet Functions |