Calculating Average based on 3 filled cells from left in a row

N

Narnimar

I have A1 to L1 total 12 cells reserved to enter the monthly values. m1 will
have last 3 months =Average(a1:c1). I need avoid the shifting of reference
cells every month in the formula to calculate last 3 month Average. Any
alternative formula I can apply to auto calculate the Average amount based on
3 value filled cells from the left end of the row? I mean if I fill apr value
in D1, then same result from =Average (b1: d1) which should automatically
return in m1.
Thanks
 
G

Gary''s Student

To average the last three values in row #1 use:

=AVERAGE(IV1:INDEX(1:1,LARGE(IF(1:1<>"",COLUMN(1:1)),3)))

This is an array formula that must be entered with CNTRL-SHFT-ENTER rather
than just the ENTER key.
 
N

Narnimar

So I put a1 to e1 with 25 28 32 14 15 and placed this formula in m1. Its
returns 0. Any reason?
 
G

Gary''s Student

My problem... We need a small change because M1 is in the same row as the
data we are trying to average:

=AVERAGE(L1:INDEX(A1:L1,LARGE(IF(A1:L1<>"",COLUMN(A1:L1)),3)))

CNTRL-SHFT-ENTER still applies!!
 
N

Narnimar

I have one limelight in this isue! I have identically made 12 cells by merger
of 2 cells for each one. Now is it possible for a solution.
Secondly, is it possible for the right formula to get the Average value
where in jan and feb month there will not be 3 cells filled?
 

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