title: Calculating the occupied resources at that time?
body: <p>I have four columns in excel, namely:</p>
  
  <ol>
  <li><p>Start time of app</p></li>
  <li><p>End time of app</p></li>
  <li><p>Occupied resources</p></li>
  </ol>
  
  <p>For example,</p>
  
  <pre><code>Start time    End time    Occupied resources
  
  0             30          10
  20            70          10
  30            50          25
  </code></pre>
  
  <p>From this information, I have to generate information about the total occupied resources in the system against the time.</p>
  
  <p>So against the start of each application, what is the number of occupied resources at that time? I cannot do a simple summation of the third column because the application leaves the resources at the end time. Any suggestions ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>My expected output would be a fourth column that states the number of occupied resources at that "starttime". So for my example above, the output would be:</p>
  
  <p>Start time TotalOccupiedAfterStart    End time    Occupied resources</p>
  
  <pre><code>0              10                       30          10
  20             20                       70          10
  30             35                       50          25
  </code></pre>
  
  <p>So at start time '0' the first application gets 10 resources. At start time '20', the second application gets 10 resources. The state of the system at this time is 20 because the first application has not ended according to its endtime. At start time 30, the third application gets 25 resources but we see that the first application ended at "30" and the second application is still running according to its end time. So the total occupied resources at starttime 30 are 25.</p>