I suspect the layout of your file is going to cause you a few headaches (ie you have multiple sheets per file - one per month) but in the most generic of terms using your file:
Z2:
=EOMONTH(MIN(E:E),-1)+1
AA2:
=EDATE(Z2,1)
copied to AB2
Z3:
=$X3*MAX(0,(1+MIN(EOMONTH(Z$2,0),$G3)-MAX(Z$2,$E3))/(1+$G3-$E3))
copied across matrix Z3:AB5
If as suspected you're looking to work across multiple sheets the date headers (Z2 onwards) should really be identical (ie Z2 may be Jan 2010 for ex.).
In addition you should list as many months going forward as you require (eg to Dec 2011)
Identical matrices will I suspect make life a little easier for you in the long term.
Bookmarks