Hello,

I am having difficulty to calculate the average
value of a variable length dataset in VBA. In addition, I would like
to loop the average calculation across all datasets (different rows and columns) and display the calculated values in a separate sheet.

Each dataset is followed by a blank cell and then another dataset
begins. I'm assuming that I can calculate the average until a nul
value is encountered. An example dataset is below:
2 4
2 4
4 5
5 5
2.3 9
6 98
5.9 12
6.3 66

2 6
10 7
10 8
15 3

6 6
95 5
6 5

5 6
5 4.1
8 9
9 6.2
0 9
10 8

The code below works perfectly for one column only and display the result on the same sheet.

Please Login or Register  to view this content.
As I need to repeat the average calculation over 100 columns and to display all the results in a separate sheet, I find it difficult to amend the above code. I would be very grateful for any help.