« first day (109 days earlier)      last day (811 days later) » 

14:12
@VidarS.Ramdal Souldn't that be: =getSheetByMonthAndDay(12,31)
@VidarS.Ramdal According to your code: function getSheetByMonthAndDay(month, day)
@VidarS.Ramdal Somehow I think the throw part needs to be placed inside the if statement....
14:37
Huh, that's weird ... I had it working here, but it obviously hadn't been saved
Thanks!
But the throw statement is placed at the end of the function, so that it will be called only if there's no matching sheet
14:51
@VidarS.Ramdal But that's part of the if, then, else isn't?
15:03
No, I'm iterating over the sheets: for(var i = 0; i < sheets.length; i++). If any sheet matches the date, the sheet's name is returned (line 8). So if we reach the throw Error line, it means no sheet has matched.
15:19
@VidarS.Ramdal Ok, I understand. I removed my comments btw.

« first day (109 days earlier)      last day (811 days later) »