Average every x cells

W

Wox

I am trying to average data in a column from every 4 cells together. For
example, if data is in column A, then average A1:A4, A5:8,... Then put the
results in contiguous cells in column B. B1 would have average of A1:A4, B2
average of A5:A8, ...

Thanks in advance
 
D

Domenic

Wox said:
I am trying to average data in a column from every 4 cells together. For
example, if data is in column A, then average A1:A4, A5:8,... Then put the
results in contiguous cells in column B. B1 would have average of A1:A4, B2
average of A5:A8, ...

Thanks in advance

Try...

B1, copied down:

=AVERAGE(INDEX($A$1:$A$100,ROWS(B$1:B1)*4-4+1):INDEX($A$1:$A$100,ROWS(B$1
:B1)*4))
 
W

Wox

Thanks Domenic, this works great.

Thanks tons

Domenic said:
Try...

B1, copied down:

=AVERAGE(INDEX($A$1:$A$100,ROWS(B$1:B1)*4-4+1):INDEX($A$1:$A$100,ROWS(B$1
:B1)*4))
 
T

T. Valko

Here's another one. More compact but volatile (will recalculate any time a
calculation takes place).

Entered in B1 and copied down:

=AVERAGE(OFFSET(A$1,ROWS(B$1:B1)*4-4,,4))
 

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

Top