Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextDate ???
I have a workbook that has multiple sheets & each one has a date field.
Someone entered the dates in a non xl date format Example: January 6 2009 I tried formatting the whole column to show d/m/yy but the text example above doesn't format. Is there a macro or something that I can run to convert these text dates to an actual date format? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextDate ???
I think this macro will do what you want (just change the sheet name and
cell range in the For Each statement to match your actual conditions)... Sub MakeNearDatesRealDates() Dim C As Range For Each C In Worksheets("Sheet1").Range("C:C") If TypeName(C.Value) < "Date" Then If IsDate(C.Value) Then C.Value = CDate(C.Value) End If Next End Sub -- Rick (MVP - Excel) "silentpro" wrote in message ... I have a workbook that has multiple sheets & each one has a date field. Someone entered the dates in a non xl date format Example: January 6 2009 I tried formatting the whole column to show d/m/yy but the text example above doesn't format. Is there a macro or something that I can run to convert these text dates to an actual date format? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextDate ???
Perfect, thank you very much!!!!
"Rick Rothstein" wrote in message ... I think this macro will do what you want (just change the sheet name and cell range in the For Each statement to match your actual conditions)... Sub MakeNearDatesRealDates() Dim C As Range For Each C In Worksheets("Sheet1").Range("C:C") If TypeName(C.Value) < "Date" Then If IsDate(C.Value) Then C.Value = CDate(C.Value) End If Next End Sub -- Rick (MVP - Excel) "silentpro" wrote in message ... I have a workbook that has multiple sheets & each one has a date field. Someone entered the dates in a non xl date format Example: January 6 2009 I tried formatting the whole column to show d/m/yy but the text example above doesn't format. Is there a macro or something that I can run to convert these text dates to an actual date format? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date format to Text Date for use in Mail Merge | Excel Discussion (Misc queries) | |||
Formula concatenating date & text converts date to number | Excel Programming | |||
how do i convert text to date (mm/yy text to mm/dd/yyyy date)? | Excel Discussion (Misc queries) | |||
VBA convert day and date from text string to Excel date | Excel Programming | |||
Concatenating a Text and a Date without losing orginal Date Format | Excel Discussion (Misc queries) |