title: SUMIFS with Multiple Date Range Criteria and Multiple Criteria
body: <p>I am trying to calculate the amount of collection for a single "Operation Code" but within a certain date range so I try the following function but it doesn't work , It calculates all the collections in this date range for all "Operation codes" not for the selected one.</p>
  
  <p><a href="https://i.stack.imgur.com/Nn4BT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nn4BT.jpg" alt="Complex SUMIFS With Multiple Date Ranges and Criteria"></a></p>
  
  <p>I use this function : </p>
  
  <pre><code>=IF(SUMPRODUCT(($D$8:$D$10&gt;=B1)*($D$8:$D$10&lt;=B2)*($C$8:$C$10=E2));SUMIFS(G8:I10;F8:H10;"&gt;="&amp;B4;F8:H10;"&lt;="&amp;B5);0)
  </code></pre>
  
  <p>Can any one help me to solve this problem</p>
  
  <p>Thanks in advance for your help .</p>