Link helped a little but couldn't quite figure how to incorporate. The problem is that the data I am getting from another spreadsheet is already messed up (i.e. there are dates that are formatted as 19xx and they shouldn't be)
I did come up with a work around that I think might work. I am going through each cell to determine if it is less than 01/01/2000. If it is less than 01/01/2000, then add 100 years to the year.
The code I tried using is as follows but can't figure out why it won't work. Not sure if the "Date" function is available in VBA
With wsAnalysis
EndRow = .Range("A" & .Rows.Count).End(xlUp).Row
For i = 2 To EndRow
If .Cells(i, 5).Value < 36526 Then
.Cells(i, 5).Value = WorksheetFunction.Date(Year(.Cells(i, 5)) + 100, Month(.Cells(i, 5)), Day(.Cells(i, 5)))
End If
Next i
End With
Thanks for any comments
Bookmarks