D
Dnk
The following code fills an array with values from 1 to 25.
Sub FillArray()
Dim f As Integer
Dim s As Integer
Dim t As Integer
Dim c As Integer
Dim m As Integer
Dim myArray(1 To 10, 1 To 10, 1 To 10)
c = 1
For f = 1 To 10
For s = 1 To 10
For t = 1 To 10
myArray(f, s, t) = n
c = c + 1
n = n + 1
If n = 26 Then n = 1
Debug.Print myArray(f, s, t), c
Next t
Next s
Next f
End Sub
The array contains 1000 elements which can be visualized as 10 rows x
10 colunms x 10 deep.
Is it possible to look at the array in the form of a cube and take 10
matrices from the front to back, 10 matrices from the right to the
left and 10 matrices from the top to the bottom. and output to a
worksheet with a row between each matrix?
This would be 30, 10 X 10 matrices.
Thanks
Sub FillArray()
Dim f As Integer
Dim s As Integer
Dim t As Integer
Dim c As Integer
Dim m As Integer
Dim myArray(1 To 10, 1 To 10, 1 To 10)
c = 1
For f = 1 To 10
For s = 1 To 10
For t = 1 To 10
myArray(f, s, t) = n
c = c + 1
n = n + 1
If n = 26 Then n = 1
Debug.Print myArray(f, s, t), c
Next t
Next s
Next f
End Sub
The array contains 1000 elements which can be visualized as 10 rows x
10 colunms x 10 deep.
Is it possible to look at the array in the form of a cube and take 10
matrices from the front to back, 10 matrices from the right to the
left and 10 matrices from the top to the bottom. and output to a
worksheet with a row between each matrix?
This would be 30, 10 X 10 matrices.
Thanks