Does this help?
=SUM(A1:A6)/SUMPRODUCT((A1:A6<>0)*1)
http://www.ozgrid.com/Excel/average-without-zero.htm