Perhaps this will work:

First sort the data on start and end columns.
Then add column D as cumulative
Then in these cells type:
D2: =c2 (ie first row is always correct)
D3: =IF(A3>=B2,C3,MAX(B3-B2,0))
Copy D3 down to the end of the table.
Add column D for the total for the period.

Regards
Mike