title: Loop through each row in a table
body: <p>I've defined a table as cards (see picture here: <a href="https://www.flickr.com/photos/113328996@N07/" rel="nofollow">https://www.flickr.com/photos/113328996@N07/</a>)</p>
  
  <p>I now want a create some VBA code which does the following:</p>
  
  <ol>
  <li>Loop through the whole table</li>
  <li>Count the times it 'hits' "A".</li>
  </ol>
  
  <p>I wantto do something like this</p>
  
  <pre><code>sub countCards
  
  //Open sheets: "sheet1"
  
  dim countA as integer
  countA = 0
  
  //foreach each row in table "cards"
  if (cells is "A")
  countA = countA + 1
  end if
  </code></pre>
  
  <p>But I can't find the syntax to get this working. Can anybody help me?</p>
  
  <p>Dear regards,</p>
  
  <p>Marc</p>