Private Sub Workbook_Open() Dim lngLetzte As Long Dim lngZeile As Long With Worksheets("Tabelle2") lngLetzte = IIf(IsEmpty(.Cells(.Rows.Count, 2)), .Cells(.Rows.Count, 2).End(xlUp).Row, .Rows.Count) + 1 End With With Worksheets("Tabelle1") For lngZeile = IIf(IsEmpty(.Cells(.Rows.Count, 2)), .Cells(.Rows.Count, 2).End(xlUp).Row, .Rows.Count) To 2 Step -1 If .Cells(lngZeile, 6) <= Date Then .Range(.Cells(lngZeile, 1), .Cells(lngZeile, 6)).Cut Worksheets("Tabelle2").Cells(lngLetzte, 1) lngLetzte = lngLetzte + 1 End If Next lngZeile End With End Sub
58.7k Fragen
251k Antworten
7.3k Nutzer