On entering a sheet I would like it to be automaticly set for the period of the two previous months as from today. I have used:
(in the textfield search I wrote:)
=MONTH(TODAY())-1 (that works, but only for one month). How can I expand my range with 2 months?
The string works, but the result is that it gives the month before the previous month .
Today the monthnumber = 8 , and I would like to see monthnumber 6 AND 7 on entering the sheet.
I would think this way
='>=' & AddMonths(MONTH(TODAY()), -2) & '<' & MONTH(TODAY())
A more robust expression will be :
Addmonths() able to capture cross year while month() cannot work in that manner.
For example if we currently at Jan 2019,
Addmonths(today(),-2) can back track till Nov 2018, while month(today())-2 will show null.
Thanks and regards,
May be there is no data for one month?