View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Macro Date Manipulation

select one of the cells and look in the formula bar. What does it look
like.

mmdd
or
mm/dd/yyyy

if mmdd then

Sub Convert_to_Date()
for each cell in selection
cell.Value = DateValue(left(cell,2) & "/" & mid(cell,3,2) & _
"/2006")
cell.Numberformat = "mm/dd/yyyy"
Next
End Sub.

If it looks like mm/dd/yyyy then just select the column and do
Format=Cells=Numberformat and select one of the date formats.

--
Regards,
Tom Ogilvy

"DKY" wrote in message
...

Just to add some more explanation. I get an excel file every week in
which I have a column (column I) and the date is in this format, so
eventually I'm going to have to figure out a way to loop this up the
column through the rows to change the date formats.


--
DKY
------------------------------------------------------------------------
DKY's Profile:

http://www.excelforum.com/member.php...o&userid=14515
View this thread: http://www.excelforum.com/showthread...hreadid=516924