How can I incorporate a quantity field into COUNTIF function?
<p>I am using a COUNTIFS function to compare forecast data from a customer (Sorted AC Forecast) with our current orders (Stock &amp; Forecast).</p>

<blockquote>
  <p>=COUNTIFS('Sorted AC Forecast'!$A:$A;'Stock &amp; Forecast'!$B5;'Sorted AC Forecast'!$B:$B;'Stock &amp; Forecast'!H$3;'Sorted AC Forecast'!$C:$C;"FUTURE NEEDS")</p>
</blockquote>

<p>I basically check for matches from the customer's spreadsheet for the following: 1. Model Number, 2. Delivery Week, 3. Order Type. So, if the model number in B5 in my spreadsheet is found in the customers' data, if the delivery week specified in H3 is found in the customers' data, and if order type matches, the match is counted. </p>

<p>The issue I am facing now is that our customer changed the format of their datasheet; it now includes a "Quantity" category. 
<strong>That means that I need to incorporate the quantity, for instance         if COUNTIF counts 2 matches and the quantity field reads 1 and 4 respectively, I need it to return 5.</strong></p>

<p>I have attached some links to pictures of the two sheets to try and make the issue clearer.</p>

<p><a href="http://i.stack.imgur.com/NqQeN.jpg" rel="nofollow">http://i.stack.imgur.com/NqQeN.jpg</a></p>

<p><a href="http://i.stack.imgur.com/z3ZGz.jpg" rel="nofollow">http://i.stack.imgur.com/z3ZGz.jpg</a></p>

<p>Any suggestions? I've tried using a macro to print out 3 duplicate rows if the quantity is specified as 3, only its slow and doesn't work very well.</p>