Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Larry L
 
Posts: n/a
Default How do I select the last 5 non zero values in a row & get an avg?

In excel I want to get the last 5 non zero values from a row (or column) and
get an average.
  #3   Report Post  
Larry L
 
Posts: n/a
Default

I could not get the formulae to work. I may have of not put the row
information in correctly. My data is in rows cells C535 to T535 for the first
person. There are 16 rows of data.

Other info ...
I need help with developing an average function for a golf league. We use an
avarage of the last 5 scores posted to develop the person's handicap. Each
week a new score is added to the data and a new average calculated with the
5th oldest score being dropped and newest score being included in the
average. The data is kept on the worksheet in rows. Because a golfer may miss
a week, some rows may have blanks that should not be considered.

For example a person's scores may look like this for the season:
45, 47, blank, 44, 48, 46, blank, 49 (the 45 is the earliest score and 49 is
the latest score). I want the formulae to consider the 5 non zero scores from
the oldest - 49 (right to left).





"Ron Rosenfeld" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SELECT large amount of data in a worksheet OTS Excel Discussion (Misc queries) 3 August 13th 05 04:43 PM
Cells User Select Locked after upgrade to Excel 2002 TWilson Excel Discussion (Misc queries) 1 August 5th 05 12:22 PM
how do you "select locked cells" w/o "select unlocked cells"? princejohnpaulfin Excel Discussion (Misc queries) 3 July 16th 05 03:53 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
Dynamic Formulas with Dynamic Ranges Ralph Howarth Excel Worksheet Functions 5 January 21st 05 08:44 AM


All times are GMT +1. The time now is 03:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"