|
本帖最后由 Albert128 于 2012-9-1 20:25 编辑
请各位大师们,帮我看看下面代码错在哪里?帮忙修正,谢谢!
Sub wsr字典()
Dim d, c, Sj, Brr()
Set d = CreateObject("scripting.dictionary")
nr1 = Sheet2.Range("a65536").End(3).Row
Brr = Sheet2.Range("a3:a" & nr1).Value
For i = 1 To nr1 - 2 Step 35
d(Brr(i, 1)) = i
Next
ReDim arr(1 To nr1 - 2, 1 To 1)
nr2 = Sheet1.Range("b1").End(xlToRight).Column
Sj = Sheet1.Range(Cells(1, 2), Cells(29, nr2)).Value‘运行到此提示错误
For i = 2 To nr2 - 2
nr = d(Sj(1, i))
If nr = "" Then
d(Sj(1, i)) = ""
Else
Sheet2.Range("a" & nr).Offset(2, 3).Resize(25) = Sj(3, i).Resize(25)‘运行到此提示错误
End If
Next
End Sub |
|