
Sub a()
Dim c As Range
Set sh1 = Sheets(1)
Set sh2 = Sheets(2)
LR1 = sh1.Cells(Rows.Count, "A").End(xlUp).Row
LR2 = sh2.Cells(Rows.Count, "A").End(xlUp).Row
Set art1 = sh1.Range("A2:A" & LR2)
With sh2
For r = 2 To LR2
art2 = .Cells(r, "A")
Set c = art1.Find(art2)
If Not c Is Nothing Then
.Cells(r, "C") = c.Offset(, 1)
.Cells(r, "D") = .Cells(r, "B") * (1 + c.Offset(, 2) / 100)
.Cells(r, "D").NumberFormat = "0.00"
End If
Next
End With
End Sub
|
