Public Sub Demo()

Dim i As Integer

For i = 2 To 452

If IsDate(Range(“E” & i).Value) Then
Range(“F” & i).Value = DateAdd(“d”, -1, DateAdd(“m”, 1, CDate(Range(“E” & i).Value)))
End If
Next i
End Sub

Advertisements