Hi, Ravi Gokal!
As a new user you might want (I'd say should and must) read this:
http://chandoo.org/forum/forums/new-users-please-start-here.14/
And regarding your issue, consider uploading a sample file (including manual examples of desired output if applicable), it'd be very useful for those who read this and might be able to help you. Thank you.
Particularly I'm a bit confused on the base period for distribution (Y, Q, M).
Just as a blind shot, give a look at the uploaded file. In B4 enter the periodicity in months and check if that's what you're looking for.
Formulas:
D1: =SI(FECHA(AÑO($B1);MES($B1)+$B$4*(COLUMNA()-3);DIA($B1))<=$B2;FECHA(AÑO($B1);MES($B1)+$B$4*(COLUMNA()-3);DIA($B1));"") -----> in english: =IF(DATE(YEAR($B1),MONTH($B1)+$B$4*(COLUMN()-3),DAY($B1))<=$B2,DATE(YEAR($B1),MONTH($B1)+$B$4*(COLUMN()-3),DAY($B1)),"")
D2: =SI(D1<>"";$B$3/(AÑO($B$2)*12+MES($B$2)-AÑO($B$1)*12+MES($B$1)/$B$4);"") -----> in english: =IF(D1<>"",$B$3/(YEAR($B$2)*12+MONTH($B$2)-YEAR($B$1)*12+MONTH($B$1)/$B$4),"")
Copy across as required. Yellow shaded just to inform up to which column are formulas copied.
Regards!