1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| Sub DatenSammeln()
Dim Sht As Worksheet
Dim Plage As Range
Dim Zeile_Leer As Range
For Each Sht In ThisWorkbook.Worksheets
If Sht.Name = "X" Or Sht.Name = "Y" Or Sht.Name "Z" Then
With Sht
Set Plage = .Range(.Cells(2, 1), _
.Cells( _
.Cells.Find("*", .[A1], -4123, , _
1, 2).Row, _
.Cells.Find("*", .[A1], -4123, , _
2, 2).Column))
End With
Plage.Copy
Worksheets("Basis").Select
Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
For Each Zeile_Leer In worksheets("Basis").columns("A")
If Zeile_Leer.Value = "" Then
Zeile_Leer.EntireRow.delete
End If
Next Zeile_Leer
End If
Next Sht
End Sub |
Partager