|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Option Explicit
Sub TEST2()
Dim ar, br, i&, j&, r&, vTemp
Application.ScreenUpdating = False
ar = Worksheets(1).[A1].CurrentRegion.Value
ReDim br(1 To UBound(ar) * UBound(ar, 2), 2)
For i = 2 To UBound(ar)
vTemp = ar(i, 1)
For j = 2 To UBound(ar, 2)
If Len(ar(i, j)) Then
r = r + 1
br(r, 0) = vTemp
br(r, 1) = ar(1, j)
br(r, 2) = ar(i, j)
End If
Next j
Next i
[G3].Resize(r, 3) = br
Application.ScreenUpdating = True
Beep
End Sub
|
评分
-
1
查看全部评分
-
|