
'这个问题还是有点神奇的,凑了一个 。
Option Explicit
Sub abc()
Dim a, i, d
Set d = CreateObject("scripting.dictionary")
a = Range("b1:c" & [b1].End(xlDown).Row).Value
For i = 1 To UBound(a)
d(a(i, 1)) = a(i, 2)
Next
a = Range("a1:a" & [a1].End(xlDown).Row).Value
ReDim b(1 To UBound(a), 1 To 3)
For i = 1 To UBound(a)
b(i, 1) = a(i, 1)
If d.exists(a(i, 1)) Then b(i, 2) = a(i, 1): _
b(i, 3) = d(a(i, 1))
Next
[f1].Resize(UBound(b), 3) = b
End Sub