View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein \(MVP - VB\)[_100_] Rick Rothstein \(MVP - VB\)[_100_] is offline
external usenet poster
 
Posts: 1
Default How to Calculate Average

Not sure if this is the best way, but it seems to work...

=AVERAGE(INDIRECT("A"&SUMPRODUCT(LARGE(ROW(A1:A100 )*(A1:A100<""),B1))&":A100"))

Change the upper range (the 100s) to your maximum anticipated row of data.

Rick


"k1ngr" wrote in message
...
I would like to find the AVERAGE of the last "X" alues in a column. The
columnn contains an unknown number of empty cells.

In the example below:
COL A contains the values to be averaged.
Cell B1 contains the variable "X" (3).
Cell C1 should contain the formula for, and the value of (5), the
average
of the last "X" (3) values in COL A.

Anyone have any suggestions?

A B C
1 9 3 5<--- What is the formula???
2
3
4 8
5 7
6 3
7
8 5
9

Thanks,
K1NGR