Thread
:
Macro to format dates
View Single Post
#
4
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Macro to format dates
Send a small sample workbook to the address below and I will take a look
--
Don Guillett
SalesAid Software
"Dan R." wrote in message
ups.com...
Don I tried your code and the result for 2070109 was 10/06/7567 and it
didn't make any changes to Jan 23 2007 12:00AM. I also tried your
suggestion Jim but since Excel doesnt recognize the current formatting
I dont think it can make any changes to it. But thanks for the
suggestions guys, I guess I can probably just use a mid formula or
something to do it.
Thanks
-- Dan
On Jan 24, 12:32 pm, "Don Guillett" wrote:
Sub formatcolumns()
Range("m1,s1").EntireColumn.NumberFormat = "mm/dd/yyyy"
End Sub
--
Don Guillett
SalesAid Software
"Dan R." wrote in
ooglegroups.com...
I'm trying to create a macro that will format some dates on my
spreadsheet...
Column 13 (M) has dates formatted as: Jan 23 2007 12:00AM
- this is always the same length, so Jan 3 would be Jan 3 2007
12:00AM
Column 19 (S) has dates formatted as: 2070109 (which is 1/9/07)
Can someone please help me write a macro to format them as mm/dd/yy,
w/o the time?
I hate to post w/o providing some code but I don't really know where to
start.
Thank You,
Dan- Hide quoted text -- Show quoted text -
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett