title: Array of Sumproduct using only one if statement
body: <p>I'd like to create a formula that creates multiple arrays based on an if statement, multiplies the arrays, and then sums the products.</p>
  
  <p>So if these are my arrays:
  <a href="https://i.stack.imgur.com/7GCFQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7GCFQ.png" alt="enter image description here"></a></p>
  
  <p>I'd like to sum their product if A doesn't equal 0. My current formula works, but I'd like to be able to do this with only one if statement.</p>
  
  <pre><code>=SUMPRODUCT(IF(A1:A5&lt;&gt;"",A1:A5%),IF(A1:A5&lt;&gt;"",B1:B5))
  </code></pre>