I have an array- Cuts(phasenum, channelnum, sheetnum). The array holds the names of worksheets that correspond to each phasenum/channelnum combination. The third argument is dimensioned to 5 elements, but there may be a different number of sheets for each phasenum/channelnum combination.
What I need to do is average the value of a certain cell in all the worksheets of each phasenum/channelnum combination. For example, there are 3 worksheets for phasenum = 1 and channelnum = 2. So I want to be able to take the average of the value in cell "A1" in the worksheets whose names are stored in Cuts(1, 2, 1), Cuts(1, 2, 2), and Cuts(1, 2, 3).
I can probably do this using For...Next loops and If statements, but I need to make about 40 similar calculations so is there an easier way? Can I use an array formula on an array?
Let me know if something needs to be clarified.
Thanks,
Liz
What I need to do is average the value of a certain cell in all the worksheets of each phasenum/channelnum combination. For example, there are 3 worksheets for phasenum = 1 and channelnum = 2. So I want to be able to take the average of the value in cell "A1" in the worksheets whose names are stored in Cuts(1, 2, 1), Cuts(1, 2, 2), and Cuts(1, 2, 3).
I can probably do this using For...Next loops and If statements, but I need to make about 40 similar calculations so is there an easier way? Can I use an array formula on an array?
Let me know if something needs to be clarified.
Thanks,
Liz