title: SUM (IF(COUNTIF)) in excel 2013
body: <pre><code>SUM(IF(COUNTIF(A$1:A1,A1)&lt;&gt;1,0,COUNTIF(A$1:A1,A1)),O1)
  </code></pre>
  
  <p>I would like to display those with same value with same number, however currently only the first value returns a 1, the rest are all 0.
  Example:</p>
  
  <pre><code>Head 1
  Head 1
  Head 1
  Body 2
  Body 2
  </code></pre>
  
  <p>Above is what I want.
  But instead I got this:</p>
  
  <pre><code>Head 1
  Head 0
  Head 0
  Body 1
  Body 0
  </code></pre>
  
  <p>Can anyone help me? </p>