AW: vergleichen zweier Tabellen nach wertx
Beni
Hallo Florian,
Gruss Beni
Sub Daten_übertragen()
Sheets("Tabelle1").Select
For I = 1 To Cells(Rows.Count, 2).End(xlUp).Row
Wert = Cells(I, 2)
With Sheets("Tabelle2").Columns("B")
Set c = .Find(Wert, LookIn:=xlValues, LookAt:=xlWhole)
If Not c Is Nothing Then
If Cells(I, 3) = c(1, 2) Then
Cells(I, 4) = c(1, 3)
Else
tmp = c.Row
For b = 1 To Columns(2).Rows.Count
Set c = .FindNext(After:=c)
If Not c Is Nothing Then
If Cells(I, 3) = c(1, 2) Then
Cells(I, 4) = c(1, 3)
Exit For
End If
If tmp = c.Row Then Exit For
End If
Next b
End If
End If
End With
Next I
End Sub