Home > Software design >  Populating row of dates in cells depending on month picked
Populating row of dates in cells depending on month picked

Time:10-05

I have a sheet where the user is supposed to pick a Month-Name from a dropdown in one cell A2. I want a formula that populates the dates in the row depending on the month picked. Please me in this case.

Thanks in advance.

CodePudding user response:

Perhaps you may try this :

enter image description here

• If you are using MS365 then use

=SEQUENCE(DAY(DATE(YEAR(TODAY()), MONTH(B2 &0) 1, 1) -1),,DATE(YEAR(TODAY()),MONTH(B2&1),1))

• if not then try the one below,

=DATE(YEAR(TODAY()),MONTH(B2&1),ROW(INDIRECT("1:"&DAY(DATE(YEAR(TODAY()),MONTH(B2&0) 1,1)-1))))

Edit: Since OP is using Excel 2013, may try this out:

enter image description here

• Formula used in cell E4

=IF(ROWS(E$4:E4)>DAY(EOMONTH(DATE(YEAR(TODAY()),MONTH($D$4&1),1),0)),
"",DATE(YEAR(TODAY()),MONTH($D$4&1),ROW(A1)))
  • Related