LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default RePost: Summing column in 5D Array

I have a 5D array. I fill the array with values within 5 imbedded Fo
Next Loops. Assume I use the rnd() function to fill them fo
simplicity. Once I have filled all the rows and columns in the firs
two dimensions (i.e. rows and columns) I want to sum all the data i
column 9. The following is not working. It is giving me a Type Mismatc
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 Su

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex conditional summing - array COUNT works, array SUM gives#VALUE fatcatfan Excel Worksheet Functions 4 November 18th 09 06:41 PM
Repost of hide a column chris morr Excel Discussion (Misc queries) 0 March 29th 07 03:48 PM
Summing cells in array Garth Excel Worksheet Functions 2 April 6th 06 08:48 AM
rEPOST: Summing clock in and out by date Jim Excel Worksheet Functions 4 January 20th 06 02:39 AM
Repost: Summing clock in and out by date Jim Excel Worksheet Functions 1 January 19th 06 04:33 PM


All times are GMT +1. The time now is 10:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"