title: Excel formula: count of unique cells in column, IF corresponding row is certain value
body: <p>Currently I have a formula that just counts the unique values in a column:</p>
  
  <pre><code>=SUM(IF(FREQUENCY(A2:A10,A2:A10)&gt;0,1))
  </code></pre>
  
  <p>However, I'd only like to count them if a corresponding cell in the same row has a certain value. Is this possible without using VBA?</p>
  
  <p>For example:</p>
  
  <pre><code>     A        B
  
       1       Old
       1       Old
       2       New
       2       New
       3       Old
       3       New
       4       New
  </code></pre>
  
  <p>I want to get the count of unique values of the A cells that correspond to the "New" value in the B col. So the unique occurrence count in A for "New" would be 3</p>
  
  <p>Have been looking over excel references and not seeing how I would do this with ranges of data.</p>