Averaging numbers

D

Donduk

I have a long colum of numbers,in row A. I would like to average every 4
numbers such as 1-4, 2-6, 3-7, 4-8 etc. and have the answer show in row B
next to the last averaged number. Can someone help me..
 
J

JE McGimpsey

One way:

B1: =IF(MOD(ROW(),4)=0,AVERAGE(OFFSET(A1,-3,0,4,1)),"")

Copy down as far as needed.
 
B

Bernd Plumhoff

=SUM(INDEX(A1:A4,0):INDEX(A1:A4,0))/4

into cell B4. Is not volatile and works if you move rows.

HTH,
Bernd
 
B

Bernd Plumhoff

Hi Ragdyer,

You are right. If we want to be independent to insertion of rows (which
means if we want to have an average of this row and the 3 previous rows in
column A) we need =SUM(INDEX(A:A,ROW()-3):INDEX(A:A;A4))/4 I think :)

Regards,
Bernd
 
R

Ragdyer

I'm sorry, but perhaps today I'm a little more dense then I usually am.
I don't see your point in the necessity of using Index().
Besides, I couldn't get your formula to work.

How about this one:

=AVERAGE(INDIRECT("A"&ROW()-3&":A"&ROW()))
 
Top