Sub test()
Dim t, c As New Collection, i&, x
t = Range("a1").CurrentRegion.Resize(, 3)
For i = 2 To UBound(t)
If t(i, 2) <> "" Then c.Add Item:=t(i, 3), Key:=t(i, 2)
Next i
On Error Resume Next
For i = 2 To UBound(t)
x = Empty: x = c(t(i, 1))
If Not IsEmpty(x) Then t(i, 1) = x
Next
Range("a1").CurrentRegion.Resize(, 3) = t
End Sub