Variable Member Averages

rwmill9716

Active Member
Joined
May 20, 2006
Messages
495
Office Version
  1. 2013
Platform
  1. Windows
I have a set of 1,000 numbers in columns A-J, rows 1-1000.

I want to specifiy a number (1-10) in cell L1 (say 7 for example) then have the
macro calculate the average of the first 7 columns in col K for all
1,000 groups of numbers.

A 10 in cell L1 would lead to the average of all 10 columns (A-J) being
calculated in col K.

Thanks,

ric
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
You could try this in cell K1

=AVERAGE(INDIRECT("A1:"&(CHAR(64+INT($L$1)))&"1000"))

to give the average of groups.

Or this in K1 and copy down for the average of each row.

=AVERAGE(INDIRECT("A"&ROW()&":"&(CHAR(64+INT($L$1)))&ROW()))

I am a little unclear about what you are trying to average.
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,799
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top