Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB converting UK to US dates, randomly, ignores cdate func!
Written macro which processes csv files - splits into +ve & -ve values of one
colum, sorts, adda couple of calculated columns. One of the cols (col index 5) is a date: dd/mm/yyyy, however excel is randomly converting some of these to american format. Using CDATE fuction makes no difference. The last step in the macro is the following code to attempt to correct this: ----------------------------------------------- with workbooks(workbookobjectname) For Each w In .Worksheets For i = 2 To w.UsedRange.Rows.Count w.Cells(i, 5) = CDate(DateSerial(Year(w.Cells(i, 5)), Month(w.Cells(i, 5)), Day(w.Cells(i, 5)))) Next i Next w end with ------------------------------- This does not work - why? Help appreciated. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cdate does not help | Excel Programming | |||
Converting Julian Dates to regular dates | Excel Worksheet Functions | |||
Converting Text dates into dates | Excel Programming | |||
VBA Function that ignores dates in a Holiday Table | Excel Worksheet Functions | |||
CDate and IsDate | Excel Programming |