Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your Overview sheet and click 'View Code'. Copy/paste this macro into the empty code window that opens up. Close the code window to return to your sheet. Select "Ja" in column G.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("G:G")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Application.EnableEvents = False
If Target = "Ja" Then
With Sheets("Absagen")
Range("B" & Target.Row).Resize(, 4).Copy .Cells(.Rows.Count, "B").End(xlUp).Offset(1)
Target.EntireRow.Delete
End With
End If
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Right click the Absagen sheet and repeat the above steps and copy/paste the macro below. Select "Ja" in column F.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("F:F")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Application.EnableEvents = False
If Target = "Ja" Then
With Sheets("Abgesagt")
Range("B" & Target.Row).Resize(, 3).Copy .Cells(.Rows.Count, "B").End(xlUp).Offset(1)
.Cells(Sheets("Abgesagt").Rows.Count, "E").End(xlUp).Offset(1) = Date
Target.EntireRow.Delete
End With
End If
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Bookmarks