Hello,
I have a start date and an end date that span many years. I need to calculate prorated information about the rest of the row based on the number in each year. Example:
Start Date, End Date, Days for 2009, Days for 2010, Days in 2011
05/04/2007, 09/08/2010, ?, ?, ?
01/12/2009, 12/05/2012, ?, ?, ?
I can create a column to capture all the days between dates using DAYS360, but I am not sure how to capture JUST the days in 2010. Then just the days in 2011, ect...
Thoughts?
Configuration: Windows XP
Hello
|
Formula in C2 is =IF(OR(B2<DATE(2009,1,1),A2>DATE(2009,12,31)),0,IF(AND(B2<=DATE(2009,12,31),A2>=DATE(2009,1,1)),B2-A2+1,IF(AND(B2<=DATE(2009,12,31),A2<=DATE(2009,1,1)),B2-DATE(2009,1,1)+1,IF(AND(B2>=DATE(2009,12,31),A2<=DATE(2009,1,1)),DATE(2009,12,31)-DATE(2009,1,1)+1,IF(AND(B2>=DATE(2009,12,31),A2>=DATE(2009,1,1)),DATE(2009,12,31)-A2+1,0)))))
|