Summing and Counting but trying to exclude zero values or real values if the adjacent value is zero.
I have a table that is working out the breakeven value of a series of numbers in two columns (multiply the values in the two columns then divide by the count of the second column).
I am trying to make it idiot proof so that if a 0.0000 is in a row in the first column but mistakenly a 1 or 2 or 3 etc appears in the next column, that "1 or 2 or 3" isn't included in the count and used as part of the denominator (because it's associated with a 0.0000 in the first column). Therefore the division number is really 3 (from the first two rows) not 4 (from the incorrect "1" in the last row). Ditto not including adding up the irrelevant 1.2500 in rows 73 an 74.
= (IF(C70 > 0, C70 * D70, 0) + IF(C71 > 0, C71 * D71, 0) + IF(C72 > 0, C72 * D72, 0) + IF(C73 > 0, C73 * D73, 0) + IF(C74 > 0, C74 * D74, 0) + IF(C75 > 0, C75 * D75, 0) + IF(C76 > 0, C76 * D76, 0) + IF(C77 > 0, C77 * D77, 0) + IF(C78 > 0, C78 * D78, 0) + IF(C79 > 0, C79 * D79, 0) + IF(C80 > 0, C80 * D80, 0)) / COUNTIF(C70:C80, ">0")
Any help would be great as I've gone round in circles for the last few hrs!
MacBook Pro 15″