title: How can I count matches between two columns based on specific text in MS Excel?
body: <p>In Excel, I have two columns; the first one represents the actual results, and the second one is the  predicted result. I want to count how many times the prediction matches the result based on specific text.</p>
  
  <p>The data is like so:</p>
  
  <pre><code>Col A      Col B
  Positive   Negative
  Positive   Positive
  Negative   Negative
  Negative   Negative
  Positive
  Negative
  </code></pre>
  
  <p>So the number of matched cells with Positive value should be <b>1</b>, while the number of matched cells with Negative value should be <b>2</b>. </p>
  
  <p>Keep in mind the match has to be in the <b>same row</b>.</p>
  
  <p>I used the following formula, but unfortunately it gave me the number of all matched cells without being able to specify the text:</p>
  
  <pre><code>=SUMPRODUCT((A1:A6=B1:B6)*1)
  </code></pre>