I have an accounting spreadsheet for each month of the year consists of 31 tabs appointed to the date Ex Format '15 -03-2015 'for the month of March
I am looking for a script that can put a comment on the tab of the current date and possibly displayed the tab of the date this at the opening of the document with a trigger of course.
Is this possible ?
Let's say you have a spreadsheet file named 'March' and there are 31 tabs, '1' to '31'. You can add the following code and set the trigger to let it run every time the spreadsheet is opened.
function goToTodaysTab(){
var ss = SpreadsheetApp.getActiveSpreadsheet();
var date = Utilities.formatDate(new Date(), ss.getSpreadsheetTimeZone() , "d");
var sheet = ss.getSheetByName(date);
ss.setActiveSheet(sheet);
var cell = sheet.getRange("A1");
cell.setNote("This comment is written on today's A1 cell.");
}
Let me know if it helped or not. :)