Reputation: 845
Is it possible to use a drop-down menu in Google Sheets as a reference for getting all dates in a month?
I have a drop-down menu in cell A3 that lets me select the year (2018/2019) and I have a drop-down menu in cell A4 that lets me select the month (Jan/Feb/Mar/etc.). Could I use these as a reference to get all the dates in that month?
I can do this by creating a lookup and referencing it but I was hoping that someone could give me a more elegant solution.
Upvotes: 1
Views: 78
Reputation: 1
=ARRAYFORMULA(TO_DATE(ROW(
INDIRECT("A"&DATE(A3, MONTH(A4&1), 1)):
INDIRECT("A"&EOMONTH(DATE(A3, MONTH(A4&1), 1), 0)))))
Upvotes: 2