Sub
Schritt_02()
Dim
LoI
As
Long
Dim
LoJ
As
Long
Dim
LoLetzte1
As
Long
Dim
LoLetzte2
As
Long
With
Worksheets(
"Tabelle1"
)
LoLetzte1 = IIf(IsEmpty(.Cells(Rows.Count, 3)), _
.Cells(Rows.Count, 3).
End
(xlUp).Row, .Rows.Count)
End
With
With
Worksheets(
"Tabelle2"
)
LoLetzte2 = IIf(IsEmpty(.Cells(Rows.Count, 9)), _
.Cells(Rows.Count, 9).
End
(xlUp).Row, .Rows.Count)
End
With
For
LoI = 1
To
LoLetzte1
For
LoJ = 1
To
LoLetzte2
If
Worksheets(
"Tabelle1"
).Cells(LoI, 3) <>
""
Then
If
Worksheets(
"Tabelle1"
).Cells(LoI, 3) = _
Worksheets(
"Tabelle2"
).Cells(LoJ, 9)
Then
Worksheets(
"Tabelle2"
).Rows(LoJ).Copy Destination:=Sheets(
"Tabelle1"
).Rows(LoI + 2)
Exit
For
Exit
For
End
If
End
If
Next
LoJ
Next
LoI
End
Sub