STDEV.P - ignore cells with value 0
You will need to use this array formula:
=STDEV.P(IF(J4:M4>0,J4:M4))
Being an array formula it must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode. If done correctly then excel will put {}
around the formula.
Wrap the formulas in the input cells as such:
=if( OriginalFormula <= 0, "", OriginalFormula )
The STDEV
(and several other)functions ignore any non-numeric value.