hallo,
max. 1,048,576 Zeilen (nach Microsoft) dürfen sich in einer Tabelle enthalten. Es kommt die Frage, ob die Anzahl der Daten tatsächlich mehr als 1,048,576 ?
Falls nein, probierst du folgende Code:
Sub CombineColumns()
Dim rng As Range
Dim iCol As Integer
''max. Wert in VBA für Interger = 65535.
''Dim lastCell As Integer
Dim lastCell As Long
on error goto ErrH
Set rng = ActiveCell.CurrentRegion
lastCell = rng.Columns(1).Rows.Count + 1
For iCol = 2 To rng.Columns.Count
Range(Cells(1, iCol), Cells(rng.Columns(iCol).Rows.Count, iCol)).Cut
ActiveSheet.Paste Destination:=Cells(lastCell, 1)
lastCell = lastCell + rng.Columns(iCol).Rows.Count
Next iCol
exit sub
ErrH:
MsgBox Err.DescriptionEnd Sub
|