title: Excel - Pivot Chart - Count if a Start Time and End Time fall into timeslot
body: <p>I'll do my best to explain.</p>
  
  <p>I have data which has the Start Time and Period of Time an activity is carried out for.
  e.g.</p>
  
  <pre><code>Name   Start Time  Activity Length (mins)
  James    08:00           45
  Phil     10:10           30
  Angela   10:20           50
  </code></pre>
  
  <p>I want to display a graph with Time on the <code>x-axis</code> and a count on the <code>y-axis</code> for every time an activity is in progress during that time period.</p>
  
  <p>I'd like to have this in a <code>PivotTable</code> as the data will change often (currently saved as an Excel Table <code>Table1</code>), and it'll interact with slicers connected to other graphs. I've shown below what I would expect the <code>PivotTable</code> to look like based on the data above (not including James).</p>
  
  <p>e.g.</p>
  
  <pre><code>Time   Count
  10:00  0
  10:05  0
  10:10  1
  10:15  1
  10:20  2
  10:25  2
  10:30  2
  10:35  2
  10:40  2
  10:45  1
  10:50  1
  10:55  1
  11:00  1
  11:05  1
  11:10  0
  11:15  0
  11:20  0
  </code></pre>
  
  <p>This is simple enough without Pivot Tables using a <code>countif</code> :</p>
  
  <pre><code>=countifs(StartTime,"&lt;="&amp;A1,StartTime+(ActivityLength/1440),"&lt;"&amp;A1),
  </code></pre>
  
  <p>but looks like I would need a Pivot if the data is constantly changing and several filters need applying.
  By the way, I'm using Excel 2010</p>