|
楼主 |
发表于 2015-9-10 23:41
来自手机
|
显示全部楼层
ptivare sub Worksheet_Change (byval target as range) Application.ScreenUpdating = False '(不显示计算过程) Set d = CreateObject("scripting.dictionary") ir = Range("a65536").End(xlUp).Row arr=range("a1:d"&ir) For i= 1 To ir d(arr(i,1)) =arr (i, 2) Next s=range(a65536).end(3).row+1 for x= 1 to x if target.cells(x,1) then arr1=range("e2:e"&x) redim arr2(1 to ubound(arr1),1 to 1) arr2(x,1)=d(arr1(x,1)) next range("f2").resize(ubound(arr2,1))=arr2 end if Application.ScreenUpdating = True end sub |
|