So I'm currently wrote a sub which will performs some calculations then output the variables back into excel. For the most part performing the calculations take no time at all for VBA to perform. But sending the array from VBA to excel will take 1-2 mins which is far too long of a wait. I'm currently using the code below to output the dataset.
Sheets("Inputs").Select
Range("q4").Select
For i = 1 To Lenght
With ActiveCell
.Offset(i - 1, 0) = Solution(i, 1)
.Offset(i - 1, 1) = Solution(i, 2)
.Offset(i - 1, 2) = Solution(i, 3)
.Offset(i - 1, 3) = Solution(i, 4)
.Offset(i - 1, 4) = Solution(i, 5)
End With
Next I
Is there a quick way to perform this?
Sheets("Inputs").Select
Range("q4").Select
For i = 1 To Lenght
With ActiveCell
.Offset(i - 1, 0) = Solution(i, 1)
.Offset(i - 1, 1) = Solution(i, 2)
.Offset(i - 1, 2) = Solution(i, 3)
.Offset(i - 1, 3) = Solution(i, 4)
.Offset(i - 1, 4) = Solution(i, 5)
End With
Next I
Is there a quick way to perform this?