Hi. I am trying to copy some data from cells into an array but there's a large amount of data and it takes quite long...
This is what I'm doing:
Is there perhaps a quicker easier way to copy the data into the array?
Thanks
This is what I'm doing:
Code:
Sub Test()
Dim myArr(20000, 500) As Double
Dim r, c As Integer
For r = 1 To 20000
For c = 1 To 500
myArr(r, c) = Sheets("Sheet2").Cells(r, c).Value
'I also tried the following:
'myArr(r, c) = Sheets("Sheet2").Range("A1").Offset(r, c).Value
Next c
Next r
End Sub
Is there perhaps a quicker easier way to copy the data into the array?
Thanks