title: How to count number of "Yes" in column C once only if ID in column B repeats
body: <p>I need help counting Yes in column C, but only count it once if ID in column B repeats</p>
  
  <p>Sample of output. for sample below count should be 6. <br><br>
  Here is dropbox file link.
  <a href="http://db.tt/iwXgGiYs" rel="nofollow noreferrer">Dropbox file link</a><br><br>
  <img src="https://i.stack.imgur.com/I0xbk.jpg" alt="enter image description here"></p>
  
  <p>I can do this already via if and else condition using formula, but I would like someone can come up with better way using single line formula.</p>
  
  <p><strong>Current solution</strong>
  in cell F2<br></p>
  
  <pre><code>=IF(B2&lt;&gt;B1,IF(C2="Yes","1",""),IF(B2=B1,IF(F1="1","",IF(B2=#REF!,"",""))))
  </code></pre>
  
  <p>in cell F3 and down<br></p>
  
  <pre><code>=IF(B3&lt;&gt;B2,IF(C3="Yes","1",""),IF(B3=B2,IF(F2="1","",IF(B3=B1,"",""))))
  </code></pre>
  
  <p>Then I just count all ones and get total 1.</p>
  
  <pre><code>=countif(F2:F159,"1")
  </code></pre>