Try...
=IF(COUNT(X10:BB10),AVERAGE(INDEX(X10:BB10,LARGE(I F(X10:BB10<"",COLUMN(X
10:BB10)-COLUMN(X10)+1),MIN(3,COUNT(X10:BB10)))):BB10),"")
....confirmed with CONTROL+SHIFT+ENTER.
--
Domenic
Microsoft Excel MVP
www.xl-central.com
Your Quick Reference to Excel Solutions
In article ,
Glenn wrote:
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...