Datenabgleich
08.07.2020 13:39:17
JulCa
Dim n, i, RowMaxPU, RowMaxPUP As Integer, wsPU, wsPUP As Worksheet
Set wsPU = ThisWorkbook.Worksheets("PU")
Set wsPUP = ThisWorkbook.Worksheets("PU P")
RowMaxPU = wsPU.UsedRange.SpecialCells(xlLastCell).Row
RowMaxPUP = wsPUP.UsedRange.SpecialCells(xlLastCell).Row
For n = 2 To RowMaxPU
For i = 2 To RowMaxPUP
If wsPU.Cells(n, 5).Value = wsPUP.Cells(i, 1).Value Then
wsPU.Cells(n, 7).Value = wsPUP(i, 2).Value
Else: i = i + i
End If
Next i
Next n