Averaging Values from Sheets in Array

Joined
Jul 8, 2005
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top