Reputation: 9
What I want to do: specify the Month and Year in a cell and create a list of the dates in the specified month. So, it should look like this: the yellow cells are the only cells that should be changed by the user:
I only find examples where you have to manually pull the date down. But that's not what I want, the user should only need to specify month and year. Any ideas?
Upvotes: 0
Views: 928
Reputation: 50008
Perhaps could be shortened, but here is an approach using DATEVALUE
, DAY
, SEQUENCE
, and EOMONTH
. It may need adjusted based on the date format in your language/Excel settings.
=DATEVALUE(B1&SEQUENCE(DAY(EOMONTH(DATEVALUE(B1&" 1, "&B2),0)))&", "&B2)
Upvotes: 1