点击文件名下载附件
Sub test()
Dim A, B, d, i, r
Application.ScreenUpdating = False
A = Sheet1.Range("a1").CurrentRegion
B = Sheet2.Range("a1").CurrentRegion
Set d = CreateObject("scripting.dictionary")
For i = 1 To UBound(A)
d(A(i, 1)) = ""
Next
r = UBound(B)
For i = 1 To r
If d.exists(B(i, 1)) Then B(i, 1) = "有" Else B(i, 1) = "无"
Next i
Sheet2.Range("b1:b" & r) = B
End Sub
Sub test2()
Dim t
t = Timer
test
MsgBox Timer - t
End Sub