|
竟然一个匹配的都没有
- Sub test()
- Dim Dic, Arr, Arrt, N&, T#
- T = Timer
- Set Dic = CreateObject("scripting.dictionary")
- With ThisWorkbook
- Arr = .Worksheets("表二").[a1].CurrentRegion.Value
- For N = LBound(Arr) + 1 To UBound(Arr)
- Dic(Arr(N, 1)) = Arr(N, 8)
- Next N
- With .Worksheets("表一")
- Arrt = .Range("e2:e" & .Cells(.Rows.Count, 5).End(3).Row).Value
- For N = LBound(Arrt) To UBound(Arrt)
- Arrt(N, 1) = Dic(Arrt(N, 1))
- Next N
- .[u2].Resize(UBound(Arrt)).Value = Arrt
- End With
- End With
- Set Dic = Nothing
- Debug.Print Timer - T
- End Sub
复制代码 |
|