Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Complex conditional summing - array COUNT works, array SUM gives#VALUE | Excel Worksheet Functions | |||
Prevent cell/array references from changing when altering/moving thecell/array | Excel Discussion (Misc queries) | |||
How to manipulate an 2D Array into a Column 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 |