View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Formula to average the last 4 non-blank numerical cells of a r

Good point, Harlan.....as always, your insight is appreciated.

***********
Regards,
Ron

XL2002, WinXP


"Harlan Grove" wrote:

Ron Coderre wrote...
....
=SUMPRODUCT(ISNUMBER(MATCH(COLUMN(A1:J1),LARGE((( A1:J1<0)*COLUMN(A1:J1))
+((A1:J1=0)*0),{1,2,3,4}),0))*A1:J1)/4

....

As long as A1:J1 doesn't contain any error values, (A1:J1=0)*0 is
ALWAYS {0,0,0,0,0,0,0,0,0,0}. No point including it in this formula.