Hi All,
I'm trying to figure out how to make it so that when I click a button that I created in Google Sheets, it takes me to the cell I told it to (via the code below) and brings that cell to the top of my sheet in terms of viewing. I don't know code, but I found the code below online for the navigation, which works great, except that it navigates to where the top of the table is at the very bottom of the page (see attached image). I'd like to find a way to where it navigates to the same cell, but it brings it up to the top of the page - is there a way to do this? Thank you
Thank you in advance.
function FUNDEDANDAWARDRECEIVEDCVM(){
// 1 = row 1, 14 = column 14 = N
goToSheet("FY22 STATUS", 3, 2);
}
function goToSheet(sheetName, row, col) {
var sheet = SpreadsheetApp.getActive().getSheetByName(sheetName);
SpreadsheetApp.setActiveSheet(sheet);
var range = sheet.getRange(row, col)
SpreadsheetApp.setActiveRange(range);
}
I'm trying to figure out how to make it so that when I click a button that I created in Google Sheets, it takes me to the cell I told it to (via the code below) and brings that cell to the top of my sheet in terms of viewing. I don't know code, but I found the code below online for the navigation, which works great, except that it navigates to where the top of the table is at the very bottom of the page (see attached image). I'd like to find a way to where it navigates to the same cell, but it brings it up to the top of the page - is there a way to do this? Thank you
Thank you in advance.
function FUNDEDANDAWARDRECEIVEDCVM(){
// 1 = row 1, 14 = column 14 = N
goToSheet("FY22 STATUS", 3, 2);
}
function goToSheet(sheetName, row, col) {
var sheet = SpreadsheetApp.getActive().getSheetByName(sheetName);
SpreadsheetApp.setActiveSheet(sheet);
var range = sheet.getRange(row, col)
SpreadsheetApp.setActiveRange(range);
}