View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Write 3d array to range

You need to loop the values to assign the 3D array to a 2D range

something like.......

Dim i As Integer, j As Integer, k As Integer
For i = 0 To 5
For j = 1 To 16
For k = 1 To 16
Cells(k + 3, j + 2 + i * 16) = team_vs_team_array(k - 1, j - 1, i)
Next
Next
Next



--
Cheers
Nigel



wrote in message
ups.com...
Hi,

I have an array defined as:
Dim team_vs_team_array(15, 15, 5)

Through code I populate each value within the array reading from
various worksheets, and completing calculations along the way (each
value is an integer).
Through the Watch function in VBA, I can confirm that the array is
holding the data the way I expect.

How can I accomplish the following:
Worksheets("temp").range("c4:ct19") = team_vs_team_array


I have been reading he archived messages, and thus far have not been
able to come up with a solution that fits my problem.

I am working in XL2003.

thanks in advance.