I want to have the dates of the current month and the previous month automatically get populated. So I'm using =MONTH(NOW())
to get the current month and =MONTH(NOW())-1
to get the previous month. Beneath them I'd like the dates to get listed just for that month. So for example it would look like this:
Is this possible?
Best Answer
With the following formula you can construct a month table, containing all days of the month.
Formula
Screenshot
Explained
The
DATE
formula is used to construct the date out of the three integers it needs. The first is theYEAR
, being calculated from theNOW
formula. The second argument is the month that you want to calculate the days from. The third argument must be a day number. Because we're using anARRAYFORMULA
, this is fed by aROW
range. The range of the rows, is dependent upon the amount of days per month. This number is calculated as follows:Example
I've created an example file for you: Days of Month