title: How to use VLOOKUP result as COUNTIF criteria
body: <p>I want to be able to determine how many times a person's particular ID (e.g. <code>#123</code>) has appeared in a separate column (e.g. <code>column C</code>) given a name (e.g. <code>Bob</code>).</p>
  
  <p>I have:</p>
  
  <blockquote>
    <ol>
    <li>Let column A consist of several names. (<code>Bob</code>)</li>
    <li>Let column B consist of IDs relating to the person's name. (<code>#123</code>)</li>
    <li>Let column C consist of those same IDs, however it may contain duplicates of the IDs (might have three <code>#123</code>s)</li>
    </ol>
  </blockquote>
  
  <p>The IDs are side-by-side with each person's respective name.</p>
  
  <p>How can I use the result of a <code>VLOOKUP</code> as the criteria (second argument) of the <code>COUNTIF</code> function? </p>
  
  <p>If I use <code>VLOOKUP</code> separately it returns the correct value that I'm trying to count. <code>=VLOOKUP(Bob, column A:column B, 2, FALSE)</code> will return <code>#123</code></p>
  
  <p>If I use <code>COUNTIF</code> separately it returns the correct count value as well. <code>=COUNTIF(column C, #123</code>) will return <code>3</code></p>
  
  <p>I've tried <code>=COUNTIF(column C, VLOOKUP(Bob, column A:column B, 2, FALSE))</code> but it returns <code>0</code>.</p>
  
  <p>I've tried referring the criteria for <code>COUNTIF</code> to a separate cell with the <code>VLOOKUP</code> formula but it still returns <code>0</code>.</p>
  
  <p>So it seems like it stops working when I combine the two together. What might the problem be, and what might be an alternative?</p>