I'm using this formula:
=AVERAGE(C4,E4,G4,I4,K4,M4)
It a cell contains zero's, it does not average it right.
How can I use the above code to ignore zeros?
The same, but a little bit simpler (array formula):For positive/negative excluding zero/empty/error values, array formula:
{=AVERAGE(IF((MOD(COLUMN(C4:M4)-COLUMN(C4),2)=0)*ISNUMBER(1/C4:M4),C4:M4))}
For positive/negative excluding zero/empty/error values, array formula:
{=AVERAGE(IF((MOD(COLUMN(C4:M4)-COLUMN(C4),2)=0)*ISNUMBER(1/C4:M4),C4:M4))}
=AVERAGE(
IF(MOD(COLUMN(C4:M4)-COLUMN(C4),2)=0,
IF(ISNUMBER(C4:M4),
IF(C4:M4 > 0,
C4:M4))))