I created the loop:
Sub DateMod()
Dim Temp As Variant, _
Prefix As Variant, _
Yr As Variant, _
Mnth As String, _
DayNum As String, _
DV As Date
Dim lastColumn As Long
Dim i As Integer
Dim sht As Worksheet
Set sht = ThisWorkbook.Worksheets("Forecast")
Range("D1").Select
lastColumn = sht.Cells(1, sht.Columns.Count).End(xlToLeft).Column
MsgBox lastColumn
For i = 4 To lastColumn
Temp = Split(Cells(1, i).Value, "\")
Yr = Split(Temp(0), "-")
Prefix = Yr(0)
Yr = Yr(1)
Temp = Split(Temp(1), " ")
Mnth = Temp(1)
DayNum = Left(Temp(0), Len(Temp(0)) - 2)
DV = DateValue(DayNum & " " & Mnth & " " & Yr)
Cells(2, i).Value = DV
Next i
End Sub
This worked great for me but the user got a type mismatch this is what her screen looked like after running:
10-30-2018 3-12-49 PM.jpg
Rows 3 and 4 were not in date format previously.
Bookmarks