I am a relative newbie. I have a long list of expenses in a Google spreadsheet and I would like for it to jump to the appropriate place in this list based on the current month when I open the sheet. Each month has 200 rows, so I would like for it to do something like:
= MONTH(TODAY())*200
but this doesn't work inside the script. I have tried pulling it from a cell that performs this function, but I don't know how to do that. In the example below, I can jump to September because I defined
var monthrow = 1800
But how to do it for the rest of the months based on today's date? Thank you for your help!
function onOpen() {
goToSheet2b()
}
function goToSheet2b() {
var monthrow = 1800
goToSheet("Expenses", monthrow, 2);
}
function goToSheet(sheetName, row, col) {
var sheet = SpreadsheetApp.getActive().getSheetByName(sheetName);
SpreadsheetApp.setActiveSheet(sheet);
var range = sheet.getRange(row, col)
SpreadsheetApp.setActiveRange(range);