Your original question and each comment all pose different questions.
In the original question let those values reside in Row 1. Then =AVERAGEIF(A1:F1,">0")
= 3
In your first comment you must seperate the individual cells with a tilde ~
.
=AVERAGEIF(G36~J36~M36~P36~S36~V36~Y36~AB36~AE36~AH36~AK36~AN36~AQ36~AT36~AW36~AZ36~BC36,">0")
In second comment, using ROWS or COLUMNS (EVEN or ODD) thus skipping every other row or column, you must enter the following function as an array (click on Array in Function Wizard OR enter function in cell and complete with Ctrl
+Shift
+Enter
).
Function to enter:=AVERAGEIF(IF(ISODD(COLUMN(A1:G1),A1:G1),">0")
At end of entry then Ctrl
+Shift
+Enter
and the function will look like this:{=AVERAGEIF(IF(ISODD(COLUMN(A1:G1),A1:G1),">0")}
This will look at only ODD columns ( A, C, E, etc.) You can also change to ISEVEN for even columns (B,D,F etc.)
ROWS works in the same fashion but remember the ranges change - A1:A20 for example.
Edit: changed “formula” to “function”.