|
本帖最后由 yjm0809 于 2018-7-30 10:19 编辑
下面这段程序,运行,未显示填列的数据,未找出错在哪,请指教,谢谢。详见附件
Sub ????????????????????() '//???л???????????
Application.ScreenUpdating = False: Application.DisplayAlerts = False '//????????????
t = Timer '//?趨??????
Dim arr, i&, brr, s$, d
Set d = CreateObject("Scripting.Dictionary")
Sheets("??????????").Activate
arr = Sheets("??????????").[a1].CurrentRegion
For i = 3 To UBound(arr)
d(arr(i, 1)) = i
Next
brr = [a1].CurrentRegion
For i = 8 To UBound(brr)
s = Left(brr(i, 1), 4)
If d.exists(s) Then
Cells(i, 2) = arr(d(s), 3): Cells(i, 3) = arr(d(s), 4): Cells(i, 4) = arr(d(s), 5)
End If
Next
ActiveWorkbook.Save
Application.ScreenUpdating = True: Application.DisplayAlerts = True
MsgBox "????????" & Format(Timer - t, "#0.0000") & " ??", , "???????????" '//??????????
End Sub
|
|