Hallo Matthias,
am einfachsten die komplette Spalte A aus Blatt 2 ans Ende der Spalte A von Blatt 1 kopieren und dann auf die komplette Spalte A von Blatt 1 Duplikate entfernen anwenden.
Im Code bin ich mal davon ausgegangen, dass sowohl in Blatt 1 als auch in Blatt 2 in der ersten Zeile Überschriften vorhanden sind und die eigentlichen Daten in beiden Blättern erst in Zeile 2 beginnen.
Public Sub aaa()
Dim loLetzteQ As Long, loLetzteZ As Long
Dim wsQ As Worksheet, wsZ As Worksheet
Set wsQ = ThisWorkbook.Worksheets("Tabelle2")
Set wsZ = ThisWorkbook.Worksheets("Tabelle1")
Application.ScreenUpdating = False
With wsQ
loLetzteQ = .Cells(.Rows.Count, 1).End(xlUp).Row
loLetzteZ = wsZ.Cells(wsZ.Rows.Count, 1).End(xlUp).Row + 1
.Range(.Cells(2, 1), .Cells(loLetzteQ, 1)).Copy wsZ.Cells(loLetzteZ, 1)
loLetzteZ = wsZ.Cells(wsZ.Rows.Count, 1).End(xlUp).Row
wsZ.Range(wsZ.Cells(1, 1), wsZ.Cells(loLetzteZ, 1)).RemoveDuplicates Columns:=1, Header:=xlYes
End With
Set wsQ = Nothing: Set wsZ = Nothing
Application.ScreenUpdating = True
End Sub
Gruß Werner
|