title: Formula using Sum product calculate total hours in overlapping date array
body: <p>Please help,</p>
  
  <p>I want to calculate the actual downtime per each type of equipment and per each type of work order, as shown in the following table sample of the data which extend in real file to 6000 rows:</p>
  
  <p><a href="https://i.stack.imgur.com/Oskyo.jpg" rel="nofollow noreferrer">Data table</a></p>
  
  <p>, when I use this formula:</p>
  
  <pre><code>{=SUMPRODUCT((COUNTIFS(K2:K6000,"&lt;"&amp;MIN(K2:K6000)+ROW(INDIRECT("1:"&amp;ROUND((MAX(L2:L6000)-MIN(K2:K6000))*1440,0)))/1440-1/2880,L2:L6000,"&gt;"&amp;MIN(K2:K6000)+ROW(INDIRECT("1:"&amp;ROUND((MAX(L2:L6000)-MIN(K2:K6000))*1440,0)))/1440-1/2880,G2:G6000,"*"&amp;P3&amp;"*",A2:A6000,"PRMN")&gt;0)+0)/60} 
  </code></pre>
  
  <p>I take a long time to calculate as I use it for 6000 rows with extra 2 criteria, so how I can improve this formula to be faster?</p>
  
  <p>Best Regards,
  Mahmoud Hazem</p>