Gruppe
Allgemein
Problem
Die Tabellenzeilen sollen in das Blatt "Resultat" gem. der in Spalte D angegebenen Anzahl kopiert werden.
StandardModule: Modul1
Sub Eintragen()
Dim iRow As Integer, iRowT As Integer, iCounter As Integer
Dim iCol As Integer
iCol = Cells(1, 256).End(xlToLeft).Column
iRow = 2
iRowT = 1
Worksheets("Resultat").Cells.ClearContents
Worksheets("Resultat").Rows(1).Value = Rows(1).Value
Do Until IsEmpty(Cells(iRow, 1))
For iCounter = 1 To Cells(iRow, iCol).Value
iRowT = iRowT + 1
Worksheets("Resultat").Rows(iRowT).Value = Rows(iRow).Value
Next iCounter
iRow = iRow + 1
Loop
MsgBox "Job erledigt!"
End Sub