As to how it works :-
Sumproduct allows you to deal with ranges, more than that, it allows you to deal with individual values within ranges normally only available via Array formula, so ...
ap155:ap184>0 tells you if each value is greater than zero, true = yes and false = no
--() is a double uniary which turns true/false into 1/0
Sumprodduct then adds these 1's and 0's to get the count of figures greater than 0 (you could also use countif but seeing as we were using sumproduct anyway ...)
the other bit ## sumproduct((ap155:ap184>0)*ap155:ap184) ## asks again if the value is greater than 0 and mutilplies the result (i.e. 1 or 0) by the individual value.
for example (1,1,0,1,0,1) * (10,100,0,10,0,10) gives a result of (10, 100, 0, 10, 0, 10) which are then summed to 130.
This isn't the best example so assume that the test is that the value must be greater than 3 but smaller than 8
so (0, 1, 1, 1, 0, 0) * (2, 7, 6, 5, 9 , 9) = (0, 7, 6, 5, 0, 0), which sums to 18
