Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change MM/DD/YYYY to MM.DD.YYYY
Does some kind soul have a macro to change MM/DD/YYYY to MM.DD.YYYY .
Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change MM/DD/YYYY to MM.DD.YYYY
Hi,
No need for a macro ... Just Format Custom and type your format mm.dd.yyyy HTH Carim |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change MM/DD/YYYY to MM.DD.YYYY
Thanks Carim ...
I need a VBA solution that works on a String. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change MM/DD/YYYY to MM.DD.YYYY
If you dealing with normal text, go ahead with
Sub Macro1() ActiveCell.Replace What:="/", Replacement:=".", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False Cells.Find(What:="/", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _ .Activate End Sub HTH Cheers Carim |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change MM/DD/YYYY to MM.DD.YYYY
Sub ee()
Dim sStr As String, sStr1 As String sStr = "01/18/2006" MsgBox sStr sStr1 = Replace(sStr, "/", ".") MsgBox sStr1 End Sub -- Regards, Tom Ogilvy " wrote: Thanks Carim ... I need a VBA solution that works on a String. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change MM/DD/YYYY to MM.DD.YYYY
The easiest way is to use the Text() Function.. in pure Excel you would
just do Text("10/12/1984", "mm.dd.yyyy") So to run it in VB, do this: Application.Worksheetfunction.Text("10/12/1984", "mm.dd.yyyy") Easy one liner |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change MM/DD/YYYY to MM.DD.YYYY
I went with the easy one liner.
I hadn't seen Application.Worksheetfunction before so that made the solution especially sweet. Thanks also to Carim. You guys make the internet great! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change date format from dd/mm/yyyy to mm/yyyy | Excel Discussion (Misc queries) | |||
Formula bar shows mm/dd/yyyy. To show dd/mm/yyyy. How? | Excel Discussion (Misc queries) | |||
how do I change date from mm/dd/yyyy to dd:mm:yyyy format in Excel | New Users to Excel | |||
change birthday display from mm/dd/yyyy to HIDE the yyyy? | Excel Worksheet Functions | |||
opening excel file - date format problem: DD/MM/YYYY vs MM/DD/YYYY | Excel Programming |