title: Macro for 2003 sumproduct function
body: <p>I have been trying to create a macro to replicate the following function in Excel 2003:</p>
  
  <pre><code>=SUMPRODUCT(--(Casework2!A2:A19&gt;="1/1/2012"+0)*(Casework2!A2:A19&lt;="31/12/2012"+0),--ISNUMBER(SEARCH("Ongoing",Casework2!H2:H19)))
  </code></pre>
  
  <p>but with no success.</p>
  
  <p>How can I count the number of rows with data on the worksheet, then use that range to replace the <code>A2:A19</code> range, then compare it to the <code>H2:H19</code> range and finally put the result into a specific cell on the table worksheet?</p>