Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So to expand on this further, lets now way that my array has 5
dimensions. I fill the array with values within 5 imbedded For Next Loops. Assume I use the rnd() function to fill them for simplicity. Once I have filled all the rows and columns in the first two dimensions (i.e. rows and columns) I want to sum all the data in column 9. The following is not working. It is giving me a Type Mismatch Error for ArrayMax. Private Sub Other() Dim A As Integer Dim B As Integer Dim C As Integer Dim D As Integer Dim E As Integer Dim Array1() As Variant Dim ArrayMax As Variant ReDim Array1(1 To 9, 1 To 13, 1 To 5, 1 To 5, 1 To 5) For A = 1 To 5 For B = 1 To 5 For C = 1 To 5 For D = 1 To 13 For E = 1 To 9 Array1(E, D, C, B, A) = Rnd() Next E Next D ArrayMax = Application.Max(Application.Index(Array1, 0, 9, 0, 0, 0)) Next C Next B Next A End Sub --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Complex conditional summing - array COUNT works, array SUM gives#VALUE | Excel Worksheet Functions | |||
Array formula: how to join 2 ranges together to form one array? | Excel Worksheet Functions | |||
Prevent cell/array references from changing when altering/moving thecell/array | Excel Discussion (Misc queries) | |||
meaning of : IF(Switch; Average(array A, array B); array A) | Excel Worksheet Functions | |||
variant array containing cel adresses convert to actual ranges-array | Excel Programming |