Not sure I can help with needed formula in C1. I think I could do it with a

User Defined Function (VBA code), but someone may come along with an answer.

Meanwhile, for the formulas needed starting at A5, try this

=IF(ROW()-ROW(A$5)+1<=B$2,DATE(YEAR(B$1),MONTH(B$2)+ROW()-ROW(A$5),DAY(B$1)),"")

Fill down the sheet as far as you care to go. It will show a blank cell

starting when you get beyond the # of months duration in B2. The 'secret' is

in the

ROW() - ROW(A$5) parts. ROW(A$5) is always going to evaluate to 5. Since

we are starting at row 5, current row - 5=0, when the formula moves to row 6,

then (currentrow=6)-5 = 1 so we get the next month.

You could write it as

=IF(ROW()-5+1<=B$2,DATE(YEAR(B$1),MONTH(B$2)+ROW()-5,DAY(B$1)),"")

But I think using the ROW(A$5) gives someone reading the formulas months

from now a little clue as to what is going on - they should see that row 5 is

the first row with the formula in it.