Anne Troy
MrExcel MVP
- Joined
- Feb 18, 2002
- Messages
- 2,632
- Office Version
- 365
- Platform
- Windows
SORRY--I CHANGED THE METHOD I'M FOCUSING ON, BUT I DON'T CARE HOW IT'S DONE. Only need to do this once on 6 files with about 20 worksheets each.
I have 6 files with thousands of records in each. Someone must've changed their SQL query because the first half of the month shows as actual date values and the rest of the month is text dates.
The code below works, but I have to select the range.
I want it to work on column D from 2nd row to last row.
I want it to work on ALL worksheets in the workbook.
Halp!! AND THANKS IN ADVANCE!
I have 6 files with thousands of records in each. Someone must've changed their SQL query because the first half of the month shows as actual date values and the rest of the month is text dates.
The code below works, but I have to select the range.
I want it to work on column D from 2nd row to last row.
I want it to work on ALL worksheets in the workbook.
VBA Code:
Sub ConvertStringToDate()
Dim i As Integer
For i = 2 To 5000
Range("D" & i) = CDate(Range("D" & i))
Next i
End Sub
Halp!! AND THANKS IN ADVANCE!
Last edited: