Option Explicit
Sub Sammeln()
Dim WksIndex As Integer
Dim WksIndexZeile As Integer
Dim WksZielZeile As Integer
Application.ScreenUpdating = False
For WksIndex = 1 To Worksheets.Count
If WksIndex <> 3 Then
Worksheets(WksIndex).Activate
WksIndexZeile = Worksheets(WksIndex).UsedRange.SpecialCells(xlCellTypeLastCell).Row
WksZielZeile = Worksheets(3).UsedRange.SpecialCells(xlCellTypeLastCell).Row + 1
ReDim ArrWks(WksIndexZeile, 3) As Variant
ArrWks() = Range("A2:C" & WksIndexZeile)
Worksheets(3).Range("A" & WksZielZeile & ":C" & WksZielZeile + WksIndexZeile - 2) = ArrWks()
End If
Next WksIndex
Worksheets(3).Columns("A:C").Sort Key1:=Worksheets(3).Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Application.ScreenUpdating = True
End SubOption Explicit
Sub Sammeln()
Dim WksIndex As Integer
Dim WksIndexZeile As Long
Dim WksZielZeile As Long
Application.ScreenUpdating = False
For WksIndex = 1 To Worksheets.Count
If WksIndex <> 3 Then
Worksheets(WksIndex).Activate
WksIndexZeile = Worksheets(WksIndex).UsedRange.SpecialCells(xlCellTypeLastCell).Row
WksZielZeile = Worksheets(3).UsedRange.SpecialCells(xlCellTypeLastCell).Row + 1
ReDim ArrWks(WksIndexZeile, 3) As Variant
ArrWks() = Range("A2:C" & WksIndexZeile)
Worksheets(3).Range("A" & WksZielZeile & ":C" & WksZielZeile + WksIndexZeile - 2) = ArrWks()
End If
Next WksIndex
Worksheets(3).Columns("A:C").Sort Key1:=Worksheets(3).Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Application.ScreenUpdating = True
End SubOption Explicit
Sub Sammeln()
Dim WksIndex As Integer
Dim WksIndexZeile As Long
Dim WksZielZeile As Long
Application.ScreenUpdating = False
For WksIndex = 1 To Worksheets.Count
If WksIndex <> 3 Then
WksIndexZeile = Worksheets(WksIndex).UsedRange.SpecialCells(xlCellTypeLastCell).Row
WksZielZeile = Worksheets(3).UsedRange.SpecialCells(xlCellTypeLastCell).Row + 1
Worksheets(WksIndex).Range("A2" & ":C" & WksIndexZeile).Copy Worksheets(3).Range("A" & WksZielZeile)
End If
Next WksIndex
Worksheets(3).Columns("A:C").Sort Key1:=Worksheets(3).Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Application.ScreenUpdating = True
End Sub
Kopieren von Datenblättern in Excel
inselgerd 01.09.2008 - 9 Hits - 2 Antworten
In Excel oder access Zeilen zusammenführen mit gleichem Key
rebusss 10.08.2008 - 48 Hits - 1 Antwort
Datensätze 'zählen' in Excel
Suki 26.08.2008 - 29 Hits - 26 Antworten
mit Excel Liste automatisch neue Excel-Dateien erstellen
jschade 26.09.2008 - 216 Hits - 5 Antworten
Mehrere Spalten aus versch. excel files in ein file zusammenkopieren
vormau 23.06.2009 - 442 Hits - 11 Antworten