title: Amount of days of intersected date ranges (Table)
body: <p>I have 2 Tables:</p>
  
  <p><strong>Table 1:</strong></p>
  
  <pre><code>Start Date | End Date   | Value
  --------------------------------
  dd.mm.yyyy | dd.mm.yyyy | 3
  </code></pre>
  
  <p><strong>Table 2:</strong></p>
  
  <pre><code>Start Date | End Date   | Value
  --------------------------------
  dd.mm.yyyy | dd.mm.yyyy | ????
  </code></pre>
  
  <p>The value of <em>Table 2</em> should be calculated the following way:  </p>
  
  <ol>
  <li>Find all rows in Table 1 one where the Start and End Date of Table 1
  intersect with the current rows Start and End Date of Table 2</li>
  <li>For each of those rows, multiply the value of Table 1 with the amount of
  days that intersect</li>
  <li>Sum up those values</li>
  </ol>
  
  <hr>
  
  <p><strong>Example:</strong></p>
  
  <p><strong>Table 1:</strong></p>
  
  <pre><code>Start Date | End Date   | Value
  --------------------------------
  01.01.2015 | 05.01.2015 | 3
  03.01.2015 | 08.01.2015 | 6
  </code></pre>
  
  <p><strong>Table 2:</strong></p>
  
  <pre><code>Start Date | End Date   | Value
  --------------------------------
  02.01.2015 | 07.01.2015 | (4 * 3) + (5 * 6)
  </code></pre>
  
  <p>Where the value can be broken down the following way:  </p>
  
  <p>(4 days intersection in Table 1, Row 1 * Value of Row 1) + (5 days intersection in Table 1, Row 2 * Value of Row 2)</p>
  
  <hr>
  
  <p>Unfortunately I have really NO idea on how to do that. The best would be if no VBA is involved (only formula).</p>
  
  <p>Any ideas?</p>
  
  <p>Thank you already!</p>