I'm trying to store number averages in an array, via a For-Next loop--then transfer the averages into a range. The following code fails to insert the values into the range:
Dim myarray(4) As Variant, i As Integer, avg As Integer
For i = 2 To 4 Step 2
avg = WorksheetFunction.Average(Array(Cells(1, i), Cells(3, i + 1)))
myarray(i) = avg
Range("a5:b5").Value = myarray()
Your help is greatly appreciated!