View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Average last 4 entries in a row.

=IF(COUNT(C4:AB4)=0,"",AVERAGE(INDEX(C4:AB4,LARGE( COLUMN(A:Z)*(ISNUMBER(C4:AB4)),4)):AB4))

if no numbers.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"RagDyeR" wrote in message
...
Try this *array* formula instead.
It will average less then 4, but this one will *stop* at the last 4
entries:

=AVERAGE(INDEX(C4:AB4,LARGE(COLUMN(A:Z)*(ISNUMBER( C4:AB4)),4)):AB4)

--
Array formulas are entered using CSE, <Ctrl <Shift <Enter, instead of
the
regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually. Also, CSE *must* be used when
revising the formula.

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"RickMoore" wrote in message
...
This formula appears to work for less that 4 entries, but it averages all
the
entries in the row if there are more than 4. I copied the formula from
your
reply, so I am pretty sure it is entered it properly. Thanks for you
help!
--
Rick


"RagDyeR" wrote:

This formula will average the last 4 entries, *BUT*, will also average
entries that are less then 4, if 4 are not present.

=AVERAGE(INDEX(C4:AB4,INDEX(LARGE(ISNUMBER(C4:AB4) *COLUMN(C4:AB4),4),0)):AB4)

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"RickMoore" wrote in message
...
I have a row of data that I would like to have a formula that will
average
the last 4 cell at have entries. The data is continually added to
The data is in cells C4:AB4
The formula will be in cell AC4
There can be less than 4 entries
There can be blank cell
There are no zeros
--
Rick