I have an Excel sheet with start and end dates for a large amount of projects/activities (approx 10,000). Some of these projects are overlapping in time and some are not. I would then like to count how many total days has at least one project going on.
Ex.:
- Project A Start: jan 1. 2013 - End: jan 3. 2013
- Project B Start: jan 2. 2013 - End: jan 4. 2013
- Project C Start: jan 6. 2013 - End: jan 7. 2013
Days in january with at least one project currently active: 1,2,3,4,6,7. Thus the total number of such days is 6.
Coming from a mathematical background I'd make a Union of the date ranges and meassure it's size. However no such standard function seems available in VBA unless the intervals are cell ranges and even then it will count overlapping ones twice. Any ideas for a clean/fast solution? (Dates are in standard excel format in my sheet).