ich habe mit einiger Hilfe von Euch folgendes Makro geschrieben:
Sub anVAB()
Dim wks As Worksheet
'Application.SreenUpdating = False
Dim iRow As Integer, iRowL As Integer, iRowT As Integer
iRowL = Cells(Rows.Count, 1).End(xlUp).Row
For iRow = 1 To iRowL
Set wks = Nothing
If InStr(Cells(iRow, 1).Value, "1") Then Set wks = Worksheets("VAB1")
If InStr(Cells(iRow, 1).Value, "2") Then Set wks = Worksheets("VAB2")
If InStr(Cells(iRow, 1).Value, "3") Then Set wks = Worksheets("VAB3")
If InStr(Cells(iRow, 1).Value, "4") Then Set wks = Worksheets("VAB4")
'... entsprechend fortsetzen
If Not wks Is Nothing Then
iRowT = wks.Cells(Rows.Count, 1).End(xlUp).Row + 1
Rows(iRow).Copy wks.Rows(iRowT)
wks.Columns.AutoFit
End If
Next iRow
Application.CutCopyMode = False
'Application.ScreenUpdating = True
End Sub
Nun möchte ich, dass zwar kopiert wird, allerdings soll in der Zieltabelle zunächst geschaut werden, ob dieser Eintrag schon vorhanden ist. Sofern dieser schon kopiert worden ist, soll das Makro nichts machen.
Wie kann man das machen?
Grüße
Weis