Hallo zusammen
Kann mir jemand das Makro unten so abändern, dass es automatisch ausgeführt wird und nicht manuell getätigt werden muss.
Sub Unit()
Dim zeile As Long, x As Date, y As Date
Range("W5") = CDate("22.05.2023") 'Startdatum gesetzt
zeile = 4
Do Until Cells(zeile, 4) = ""
x = CDate(Cells(zeile - 1, 23))
For y = x To x + 365 Step 14
If Cells(zeile, 4) y Then
Cells(zeile, 23) = y
Exit For
End If
Next
zeile = zeile + 1
Loop
End Sub
Besten Dank.
Gruss
Markus