Dim
StrDatum
As
String
Dim
LastRowName
As
Integer
Dim
B
As
Integer
Dim
i
As
Integer
Dim
LastRowSort
As
Integer
Dim
D
As
Integer
Dim
Datum
As
Date
Dim
LastRowFeiertag as
Integer
LastRowFeiertag = Sheets(2).Range(
"E"
& Rows.Count).
End
(xlUp).Row
LastRowName = Tabelle2.Range(
"A"
& Rows.Count).
End
(xlUp).Row
LastRowSort = Sheets(B + 1).Range(
"A"
& Rows.Count).
End
(xlUp).Row
For
B = 2
To
LastRowName
D = 2
For
i = 2
To
LastRowSort
Datum = Sheets(B + 10).Cells(i, 2).Value
If
Weekday(Datum, vbMonday) =
Not
6
And
Weekday(Datum, vbMonday) =
Not
7
And
Datum =
Not
Sheets(2).Cells(2, 5).Value
And
Datum =
Not
Sheets(2).Cells(3, 5).Value
Then
Sheets(B + 10).Cells(i, 1).Copy Sheets(B + 10).Cells(D, 51)
Sheets(B + 10).Cells(i, 2).Copy Sheets(B + 10).Cells(D, 52)
Sheets(B + 10).Cells(i, 3).Copy Sheets(B + 10).Cells(D, 53)
Sheets(B + 10).Cells(i, 4).Copy Sheets(B + 10).Cells(D, 54)
Sheets(B + 10).Cells(i, 5).Copy Sheets(B + 10).Cells(D, 55)
Sheets(B + 10).Cells(i, 6).Copy Sheets(B + 10).Cells(D, 56)
Sheets(B + 10).Cells(i, 7).Copy Sheets(B + 10).Cells(D, 57)
Sheets(B + 10).Cells(i, 8).Copy Sheets(B + 10).Cells(D, 58)
Sheets(B + 10).Cells(i, 9).Copy Sheets(B + 10).Cells(D, 59)
Sheets(B + 10).Cells(i, 10).Copy Sheets(B + 10).Cells(D, 60)
Sheets(B + 10).Cells(i, 11).Copy Sheets(B + 10).Cells(D, 61)
Sheets(B + 10).Cells(i, 12).Copy Sheets(B + 10).Cells(D, 62)
D = D + 1
End
If
Next
i
Next
B