Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to convert mmddyyyy format into mm/dd/yyyy format
Hello,
I'm trying to write a macro to do this function: =DATE(RIGHT(e2,4),LEFT(e2,LEN(e2)-6),LEFT(RIGHT(e2,6),2)) I attempted to record the macro and then used an existing loop function off another part of code to loop through all dates in column E but is not working too well. Thank you very much, -- Thank You! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to convert mmddyyyy format into mm/dd/yyyy format
Have you tried using the Format command in a macro script? It would look
something like, dMyDate=Format(dExistingDate, "mm/dd/yyyy"). Note that the dd will always return a two digit date. Single digit dates will be preceeded by a "0". Hope that helps. Mike "maijiuli" wrote: Hello, I'm trying to write a macro to do this function: =DATE(RIGHT(e2,4),LEFT(e2,LEN(e2)-6),LEFT(RIGHT(e2,6),2)) I attempted to record the macro and then used an existing loop function off another part of code to loop through all dates in column E but is not working too well. Thank you very much, -- Thank You! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to convert mmddyyyy format into mm/dd/yyyy format
Why not just
Selection.NumberFormat = "mm/dd/yyyy" Cliff Edwards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I convert date format yyyymmdd to mm/dd/yyyy | Excel Worksheet Functions | |||
How do I change date format m/d/yyyy to mmddyyyy toremove the dash | Excel Worksheet Functions | |||
How do I convert a birthdate format from yyyy/mm/dd to mm/dd/yyyy | Excel Worksheet Functions | |||
Change m/d/yyyy to mmddyyyy in text | Excel Discussion (Misc queries) | |||
How to convert the dates from the YY:DD forma to MM/dd/YYYY format | Excel Worksheet Functions |