title: COUNTIFS and only display value the first time criteria is met
body: <p>I have the following Excel spreadsheet:</p>
  
  <pre><code>          A                B                C         |           D
  1      Product         Quantity           Count       |       Desired Result
  
  2      Product A         20                 2         |             2
  3      Product A          0                           |
  4      Product A         50                 2         |
  
  5      Prodcut B         10                 3         |             3
  6      Product B          0                           |
  7      Product B         30                 3         |
  8      Product B          0                           |
  9      Product B         40                 3         |
  
  10     Product C         60                 1         |             1
  </code></pre>
  
  <p>In <strong>Column A</strong> you can see a list of different Products and in <strong>Column B</strong> their quantity.</p>
  
  <p>In <strong>Column C</strong> I want to count the products in <strong>Column A</strong> if the quantity in <strong>Column B</strong> <code>&gt;0</code>. <br>
  Therefore, I use the following formula:</p>
  
  <pre><code>=IF(AND(A2=A1,C1&lt;&gt;""),"",COUNTIFS($A$2:$A$10,A2,$B$2:$B$10,"&gt;"&amp;0))
  </code></pre>
  
  <p>The count itself works already with this formula. However, what I want to achieve is that the count is <strong>only</strong> <strong>displayed the first time</strong> when the product appears in the list. <br> (See desired result in <strong>Column D</strong>).</p>
  
  <p>What do I have to change in my formula to achieve this?</p>