Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format date macro
I tried to make a macro to format the date into the configuration I
need. It is going from 01/01/2007 to 2007-01-01 It is part of a larger macro that does a host of things but this part was: Columns("M:M").Select Selection.NumberFormat = "yyyy-mm-dd" Columns("J:J").Select Selection.NumberFormat = "yyyy-mm-dd" however, when I run the macro the date comes out as 01-01-tuesday. Does any one know what might be happening here and how i can fix it? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format date macro
I just used this from your old format to this and it worked just fine.
Sub newdateformat() Range("j1,m1").EntireColumn.NumberFormat = "yyyy-mm-dd" End Sub -- Don Guillett SalesAid Software "Dagonini" wrote in message ups.com... I tried to make a macro to format the date into the configuration I need. It is going from 01/01/2007 to 2007-01-01 It is part of a larger macro that does a host of things but this part was: Columns("M:M").Select Selection.NumberFormat = "yyyy-mm-dd" Columns("J:J").Select Selection.NumberFormat = "yyyy-mm-dd" however, when I run the macro the date comes out as 01-01-tuesday. Does any one know what might be happening here and how i can fix it? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format date macro
Sounds like you are using
Columns("M:M").Select Selection.NumberFormat = "yyyy-mm-dddd" -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Dagonini" wrote in message ups.com... I tried to make a macro to format the date into the configuration I need. It is going from 01/01/2007 to 2007-01-01 It is part of a larger macro that does a host of things but this part was: Columns("M:M").Select Selection.NumberFormat = "yyyy-mm-dd" Columns("J:J").Select Selection.NumberFormat = "yyyy-mm-dd" however, when I run the macro the date comes out as 01-01-tuesday. Does any one know what might be happening here and how i can fix it? Thanks! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format date macro
I'm still having problems. Could it be that I am not saving correctly
because I am saving as a .CSV? Does a .CSV file not always keep the formatting? Bob Phillips wrote: Sounds like you are using Columns("M:M").Select Selection.NumberFormat = "yyyy-mm-dddd" -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Dagonini" wrote in message ups.com... I tried to make a macro to format the date into the configuration I need. It is going from 01/01/2007 to 2007-01-01 It is part of a larger macro that does a host of things but this part was: Columns("M:M").Select Selection.NumberFormat = "yyyy-mm-dd" Columns("J:J").Select Selection.NumberFormat = "yyyy-mm-dd" however, when I run the macro the date comes out as 01-01-tuesday. Does any one know what might be happening here and how i can fix it? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Message box date format macro help | Excel Worksheet Functions | |||
Message box date format macro help | Excel Worksheet Functions | |||
Date Format Macro Problem | Excel Programming | |||
Macro SaveAs - Date format | Excel Programming | |||
Macro to format date | Excel Programming |