View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default Average last 3 in range

Preschool Mike wrote:
Is this doable? 0 numbers no error message, 1 or 2 numbers the average of the
2, more than 3 numbers the average of the last three in the range. If this
isn't doable then just something to clear up the number error when less than
3 numbers are entered.

Thanks so much,



I can get it to handle 1 or 2 numbers by using:

=AVERAGE(INDIRECT(ADDRESS(ROW(),LARGE(IF(X10:BB10< "",
COLUMN(X10:BB10),""),MIN(COUNT(X10:BB10),3)))&":BB "&ROW()))


Still having trouble with the 0 numbers...