I have a sheet with horizontal dates (starting at 1 January, ending in 31 Dec). I'm trying to put a button in the sheet which will make it jump to "Today".
This is what I have so far:
function goToSheet(sheetName, row, col) {
var sheet = SpreadsheetApp.getActive().getSheetByName(sheetName);
SpreadsheetApp.setActiveSheet(sheet);
var range = sheet.getRange(1, col)
SpreadsheetApp.setActiveRange(range);
}
function goToSheet2b() {
goToSheet("2016", 1,299);
}
2016 is the sheet name, 299 is the column number for today's date and it actually jumps to today, but I would need to manually change 299 in order for it to work every day. Is there a simple way of going about this?