Hi Mel
du kopierst die leere Spalte A mit und da du als Zielzelle immer die erste freie Zeile in Spalte A suchst
überschreibt es dir natürlich die Einträge
also entweder du kopierst nur ab Spalte B
Private Sub Worksheet_Change(ByVal Target As Range)
Dim B As Long
If Not Intersect(Target, Range("G1:G1000")) Is Nothing Then
Application.EnableEvents = False
If Target.Value = "erledigt" Then
B = Target.Row
Range(Cells(B, 2), Cells(B, 7)).Copy _
Destination:=Sheets("BGM_erledigt").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
Target.EntireRow.Delete
End If
Application.EnableEvents = True
End If
End Sub
oder suchst die leere Zelle in Spalte B (2) der Zieltabelle
Private Sub Worksheet_Change(ByVal Target As Range)
Dim B As Long
If Not Intersect(Target, Range("G1:G1000")) Is Nothing Then
Application.EnableEvents = False
If Target.Value = "erledigt" Then
B = Target.Row
Range(Cells(B, 1), Cells(B, 7)).Copy _
Destination:=Sheets("BGM_erledigt").Cells(Rows.Count, 2).End(xlUp).Offset(1, 0)
Target.EntireRow.Delete
End If
Application.EnableEvents = True
End If
End Sub
MfG Tom
|