I have a list of roughly 6500+ rows in Excel2007. Each row represents the time that a person was on disability leave with a start date and an end date. If there is no end date, then the end date is set to 12/31/9999. A sample of some values is below:
Workers Compensation 4/7/2009 12/31/9999
Workers Compensation 5/21/2009 12/31/9999
Short Term Disability 8/27/2009 10/7/2009
Short Term Disability 6/22/2009 7/15/2009
Short Term Disability 1/21/2009 10/4/2009
Short Term Disability 4/8/2009 6/14/2009
Short Term Disability 6/19/2009 10/5/2009
Short Term Disability 8/19/2009 12/31/9999
Short Term Disability 5/30/2009 6/18/2009
Short Term Disability 7/9/2009 7/20/2009
The first date is the date they went on leave; the second date is the date they returned from leave.
I am trying to break out each row so that I can get a count of the number of days per pay period that the person was on leave. We pay bi-weekly with the first pay of 2009 covering the period between 12/14/08 and 12/27/08 and incrementing bi-weekly thereafter (pay #2 covers 12/28/08 thru 1/10/09 etc).
So, as an example, I know that the first row of data covers pay periods 200909 thru the current pay period (we are currently on pay period 200924). I also know that periods 200910 thru 200924 should have 10 days as the calculated figure (since there are 10 workdays per pay), and that the count for pay period 200909 should be 2 (since there are 2 workdays in that payperiod that overlap with when the employee was on leave.
I'd like to use a formula to evaluate this, rather than writing code. Any ideas? Thanks in advance.