Hello rdowney79,
Here is the updated macro. The macro has been added to the attached workbook.
Sub PostDeliveryDates()
Dim Data(0) As Variant
Dim DateMatch As Object
Dim n As Long
Dim RegExp As Object
Dim Rng As Range
Dim RngEnd As Range
Dim Wks As Worksheet
Set Wks = ActiveSheet
Set Rng = Wks.Range("N2:S2")
Set RngEnd = Wks.Cells(Rows.Count, "A").End(xlUp)
If RngEnd.Row < Rng.Row Then Exit Sub
Set Rng = Rng.Resize(RngEnd.Row - Rng.Row + 1)
Set RegExp = CreateObject("VBScript.RegExp")
RegExp.Global = True
RegExp.Pattern = "\d{1,2}\-\d{1,2}\-\d{1,2}"
For n = Rng.Row To RngEnd.Row
If IsEmpty(Wks.Cells(n, "C")) Then
Data(0) = Application.Index(Rng.Rows(n - 1).Value, 1, 0)
Set DateMatch = RegExp.Execute(Join(Data(0), " "))
If DateMatch.Count > 0 Then Wks.Cells(n, "C") = CDate(DateMatch(0))
End If
Next n
End Sub
Bookmarks