0

I want to create a sheet trigger to select the previous year and the current year but not the current month.

If for example we were in 201604...

Sample data is as follows:

201511

201512

201601

201602

201603

201604

Selection I would want would be:

201511

201512

201601

201602

201603
Matt
  • 14,906
  • 27
  • 99
  • 149

1 Answers1

0

In the Trigger expression you can use the YearStart function along with the MAX function to get all of the previous year plus the current years months excluding the current month.

='<' & Max(YearMonth) & '>=' & Num#(Date(YearStart(Max(Date#(YearMonth, 'YYYYMM')), -1), 'YYYYMM'), '##')
Matt
  • 14,906
  • 27
  • 99
  • 149