So...If I understand correctly...
If the dates in Col D are greater than a specific date then the dates in Col F must become those greater dates of Col D...
Sub J3v16()
Dim Dt As Date
Dt = CDate("20/03/2023")
With Cells(1).CurrentRegion.Columns(6)
.Value = Evaluate("=If(Row(" & .Address & "),If(" & .Offset(, -2).Address & "> " & Dt & "," & .Offset(, -2).Address & "," & .Address & "))")
End With
End Sub
Depending on size of data...storing in array and then looping could be faster...
Sub J3v16()
Dim Data, Dt As Date, i As Long
Dt = CDate("20/03/2023")
With Cells(1).CurrentRegion
Data = .Value2
For i = 2 To UBound(Data)
If Data(i, 4) > Dt Then Data(i, 6) = Data(i, 4)
Next i
.Value = Data
End With
End Sub
Bookmarks