Wrap it all in an if and test for an error:
=if(iserror(AVERAGE(IF(B4:M4<>0,B4:M4))),"-",AVERAGE(IF(B4:M4<>0,B4:M4)))

Note: when using "-" keep in mind other formulas referring to this cell. If
you're doing a calculation then a "-" will produce an error.
You may be better setting the error value to 0 (zero) and using the
formatting to show a dash.

HTH

Giz

"Karen" wrote:

> I have a cell with the following formula:
> {=AVERAGE(IF(B4:M4<>0,B4:M4))}
> It's producing the infamous #DIV/0! error - When the cell produces this
> error, I just want a dash in its place. How can this be done?
>
> Thank you