vba如何將一個(gè)數(shù)組輸出在excel的sheet中?
Sub sof()
Dim sso()
Dim sar
sar = sheets("sheet1").[A65536].End(3).Row
ReDim sso(1 To sar)
For i = 1 To sar
sso(i) = Cells(i, 1)
Next
Dim assd, xo
xo = 1
assd = InputBox("請(qǐng)輸入要分幾列輸出:")
For y = 1 To UBound(sso())
For x = 1 To assd
Cells(y, x + 2) = sso(xo)
xo = xo + 1
If xo > UBound(sso()) Then Exit Sub
Next
Next
End Sub看看可以不?