aus einer Tabelle mit einer unbekannten Anzahl an Zeilen soll jede 6. (beginnend bei 1) in ein neues Tabellenblatt kopiert werden. Wie kann ich das realisieren?
Ciao Steffen
Option Explicit
Sub Kopieren()
Dim Loletzte As Long
Dim LoI As Long
Dim LoZeile As Long
Loletzte = IIf(IsEmpty(Cells(Rows.Count, 1)), Cells(Rows.Count, 1).End(xlUp).Row, Rows. _
Count)
For LoI = 1 To Loletzte Step 6
Rows(LoI).Copy Worksheets("Tabelle2").Rows(LoZeile + 1)
LoZeile = LoZeile + 1
Next LoI
End Sub