View Single Post
  #2   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 24 Aug 2005 11:27:01 -0700, "Larry L" <Larry
wrote:

In excel I want to get the last 5 non zero values from a row (or column) and
get an average.


For Rows:

=AVERAGE(TRANSPOSE(OFFSET(A1,0,LARGE((1:10)*(COLU MN(1:1)),{1,2,3,4,5})-1)))

For Columns:

=AVERAGE(TRANSPOSE(OFFSET(A1,LARGE((A1:A655350)*( ROW(A1:A65535)),{1,2,3,4,5})-1,0)))


These are array formulas so after typing them in, hold down <ctrl<shift while
hitting <enter. Excel will place braces {...} around the formula.

Since these are array formulas, they cannot reference an entire column.


--ron