【发布时间】:2016-06-24 00:06:20
【问题描述】:
我不知道如何做到这一点,所以任何帮助都会很棒。使用数组,我将逐行发送到 Excel 工作簿,该工作簿执行大量计算(太多无法编程)并吐出 13 个值,我想将它们存储到另一个数组中。这可能吗?
Dim aP() as Variant
Dim wbR as Workbook
Dim wsR as Worksheet
Dim i as Long
Set wbR = Workbooks.Open([directory])
Set wsR = wbR.Sheets("Sheet1")
aP = Application.Transpose(Activesheet.Range("A1:Z100"))
For i = 1 to 100
wsR.Range("A1:A26") = Application.Index(aP, [row(1:26)], i)
'this is where I need help. Want to paste range C1:C13 into another array,
'so that I can paste it back into the activesheet. I do not wish to paste it
'straight back to the worksheet, but accumulate all the data into array and
'and then paste the array into the activesheet
Next i
Exit Sub
【问题讨论】:
-
是的,绝对有可能。发布您当前的代码,我相信人们会有建议。
-
我已编辑问题以包含我当前的代码
标签: arrays excel multidimensional-array vba