With
Worksheets(
"Tabelle1"
)
LoLetzte1 = IIf(IsEmpty(.Cells(Rows.Count, 1)), _
.Cells(Rows.Count, 1).
End
(xlUp).Row, .Rows.Count)
End
With
With
Worksheets(
"Tabelle2"
)
LoLetzte2 = IIf(IsEmpty(.Cells(Rows.Count, 2)), _
.Cells(Rows.Count, 2).
End
(xlUp).Row, .Rows.Count)
End
With
For
LoI = 1
To
LoLetzte1
For
LoJ = 1
To
LoLetzte2
If
Worksheets(
"Tabelle1"
).Cells(LoI, 1) <>
""
Then
If
Worksheets(
"Tabelle2"
).Cells(LoJ, 2) <> Worksheets(
"Tabelle1"
).Cells(LoI, 1)
Then
Worksheets(
"Tabelle1"
).Rows(LoI).Copy
With
Worksheets(
"Tabelle3"
)
Loletzte3 = .UsedRange.SpecialCells(xlCellTypeLastCell).Row + 1
If
Loletzte3 > Rows.Count
Then
MsgBox
"In Tabelle3 ist keine Zeile mehr frei"
Application.CutCopyMode =
True
Exit
Sub
End
If
.Rows(Loletzte3).PasteSpecial Paste:=xlValues
.Rows(Loletzte3).PasteSpecial Paste:=xlFormats
End
With
Exit
For
End
If
End
If
Next
LoJ
Next
LoI
Application.CutCopyMode =
False
Application.ScreenUpdating =
True