|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Option Explicit
Sub TEST2()
Dim ar, br, i&, j&, r&
Application.ScreenUpdating = False
With Intersect(ActiveSheet.UsedRange, Columns("B:I"))
ar = .Value
ReDim br(1 To UBound(ar) * UBound(ar, 2), 0) As String
End With
For j = 1 To UBound(ar, 2)
For i = 3 To UBound(ar)
If Len(ar(i, j)) Then
r = r + 1
br(r, 0) = ar(1, j) & ":" & ar(i, j)
End If
Next i
Next j
Columns("k").Clear
[K1].Resize(r) = br
Application.ScreenUpdating = True
Beep
End Sub
|
评分
-
2
查看全部评分
-
|