I want to average all cells in a row based on the day of the week in another row and I only want it to include cells greater then 0. Essentially for the average returned in R2, the range is A2:N2, if A1:N1 is Sunday, return average for sundays and only include in the average if cell in row 2 is >0. I know this was a complicated explanation, but the best way I could tink to explain it.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[TD="align: center"]J[/TD]
[TD="align: center"]K[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]M[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]P[/TD]
[TD="align: center"]Q[/TD]
[TD="align: center"]R[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Saturday[/TD]
[TD]Sunday[/TD]
[TD]Monday[/TD]
[TD]Tuesday[/TD]
[TD]Wednesday[/TD]
[TD]Thursday[/TD]
[TD]Friday[/TD]
[TD]Saturday[/TD]
[TD]Sunday[/TD]
[TD]Monday[/TD]
[TD]Tuesday[/TD]
[TD]Wednesday[/TD]
[TD]Thursday[/TD]
[TD]Friday[/TD]
[TD][/TD]
[TD][/TD]
[TD]DAY[/TD]
[TD]AVG[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]119[/TD]
[TD]36[/TD]
[TD]236[/TD]
[TD]246[/TD]
[TD]255[/TD]
[TD]254[/TD]
[TD]248[/TD]
[TD]116[/TD]
[TD]33[/TD]
[TD]241[/TD]
[TD]252[/TD]
[TD]265[/TD]
[TD]262[/TD]
[TD]254[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sun[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[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[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[TD="align: center"]J[/TD]
[TD="align: center"]K[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]M[/TD]
[TD="align: center"]N[/TD]
[TD="align: center"]O[/TD]
[TD="align: center"]P[/TD]
[TD="align: center"]Q[/TD]
[TD="align: center"]R[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Saturday[/TD]
[TD]Sunday[/TD]
[TD]Monday[/TD]
[TD]Tuesday[/TD]
[TD]Wednesday[/TD]
[TD]Thursday[/TD]
[TD]Friday[/TD]
[TD]Saturday[/TD]
[TD]Sunday[/TD]
[TD]Monday[/TD]
[TD]Tuesday[/TD]
[TD]Wednesday[/TD]
[TD]Thursday[/TD]
[TD]Friday[/TD]
[TD][/TD]
[TD][/TD]
[TD]DAY[/TD]
[TD]AVG[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]119[/TD]
[TD]36[/TD]
[TD]236[/TD]
[TD]246[/TD]
[TD]255[/TD]
[TD]254[/TD]
[TD]248[/TD]
[TD]116[/TD]
[TD]33[/TD]
[TD]241[/TD]
[TD]252[/TD]
[TD]265[/TD]
[TD]262[/TD]
[TD]254[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sun[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Mon[/TD]
[TD][/TD]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