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: 32
Default calculting stats of column array in 3D array

I am storing school marks by student by class over a 4 semester
period. each student takes 5 classes each semester and continues on
to the next level each semester. Thus student 1 takes Math1,
English1, Physics1, Chem 1, PhysEd 1 in the first Semester. In
Semester 2 all the same kids take Math2, English 2 etc. I will assume
no failure for the purpose of this. Data collected with look like
table below. But this will be 3D by semester

Semester 1
Course---Cr1Cr2Cr3Cr4
Student1-20%20%20%20%
Student2-60%60%60%60%
Student3-80%80%80%80%

I eventually want to calculte the min/max/avg marks for each subject
in each semester. Once all the data is calculated I want to pass the
min/max/avg to a summary array. I would like to end up with the
following table:

Semester 1
Course Cr1Cr2Cr3Cr4
Min----20%20%20%20%
Max----80%80%80%80%
Avg----60%60%60%60%

And since I have this over 4 semester, I want to be able to create all
four verions of this table. I cant seem to figure out how to calc the
min/max/avg of the column arrays.

Can anyone help me with this.

Option Base = 1
Dim A As Single
Dim B As Single
Dim C As Single
Dim Data() As Variant
Dim Max As Single
Dim Min As Single
Dim Avg As Single
Dim StatsArray As Variant

For A = 1 to 4
For B = 1 to 5
For C = 1 to 20
Data(C,B,A) = rnd()
Next C
Min = ?????
MAx = ?????
Avg = ?????
StatsArray(1,B,C) =Min
StatsArray(1,B,C) =Max
StatsArray(1,B,C) =Avg
Next B
Nect A

Thanks in advance

TS
 
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
Prevent cell/array references from changing when altering/moving thecell/array nme Excel Discussion (Misc queries) 1 September 19th 08 01:53 PM
How to manipulate an 2D Array into a Column Array? Joe Excel Discussion (Misc queries) 3 April 16th 07 06:30 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
variant array containing cel adresses convert to actual ranges-array Peter[_21_] Excel Programming 5 December 10th 03 09:50 PM


All times are GMT +1. The time now is 11:51 PM.

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

About Us

"It's about Microsoft Excel"