Here is the question: "Suppose your program fills a large two-dimensional array called results with values, and you would like it to dump these values into an Excel range. For example, if results is m by n, you would like the program to dump the values into a range with m rows and n columns. One way is to use two nested loops to dump the data one element at a time into the appropriate cell."
What I've got so far:
Dim MyArray(m, n) As Long
Dim X as Long
Dim Y as Long
For X = 1 To m
For Y = 1 To n
MyArray(X, Y) = Cells(X, Y).Value
Next Y
Next X
I really need some help figuring this out I'm totally lost
Assuming you fill your data somewhere else before that, you can just use
This fills the array with m rows and n columns and then transfers it all into a range starting in cell
A1
of theActiveSheet
: