|
发表于 2012-8-16 15:26
|
显示全部楼层
本楼为最佳答案
xxjjdd0000 发表于 2012-8-16 15:20
老师,出现错误,就是应用程序错误或定义错误 - Sub abc()
- Dim arr, i, j, icolumn
- arr = Range("a1").CurrentRegion
- icolumn = Cells(1, 256).End(xlToLeft).Column
- For i = 1 To [G65536].End(3).Row
- For j = 1 To UBound(arr)
- If Cells(i, "g") = arr(j, 1) Then
- Cells(i, icolumn).Offset(, 1) = arr(j, 2)
- Cells(i, icolumn).Offset(, 2) = arr(j, 3)
- Cells(i, icolumn).Offset(, 3) = arr(j, 4)
- End If
- Next j
- Next i
- End Sub
复制代码 |
|