Material = wks.Cells(1 + i, 2)
Worksheets(
"Material"
).
Select
Range(
"B2"
).
Select
Zeilenanzahl2 = ActiveSheet.Cells(Rows.Count, 2).
End
(xlUp).Row - 1
For
j = 1
To
Zeilenanzahl2
If
Material = Worksheets(
"Material"
).Cells(1 + j, 2)
Then
wks.Cells(1 + i, 2) = Worksheets(
"Material"
).Cells(1 + j, 1)
End
If
Next
j
Farbe = wks.Cells(1 + i, 1)
Worksheets(
"Material"
).
Select
Range(
"B4"
).
Select
Zeilenanzahl3 = ActiveSheet.Cells(Rows.Count, 2).
End
(xlUp).Row - 1
For
k = 1
To
Zeilenanzahl3
If
Farbe = Worksheets(
"Material"
).Cells(1 + k, 5)
Then
wks.Cells(1 + i, 1) = Worksheets(
"Material"
).Cells(1 + k, 4)
End
If
Next
k
wks.Cells(1 + i, 3) = wks.Cells(1 + i, 2).Value &
" "
& wks.Cells(1 + i, 1).Value
Next
i