Solved with 2 columns
I have a 2 column solution, the left column builds a running total and the right containing the sums of all the 0's.
The left column contains:
=IF(P6=0,IF(Q5>0,Q5+1,1),0)
for all rows.
the right column contains:
=IF(Q6>0,IF(Q7=0,Q6,""),"")
for all rows.
Then to get a total count in all the rows, sum the right column.
Give this a try
|