I'm trying to make a navigation menu to jump to certain cells in my sheet since it's very long. This could be done by the following code:
function jumpToCellB4() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var range = sheet.getRange("B4");
sheet.setActiveSelection(range);
}
function onOpen() {
SpreadsheetApp.getUi()
.createMenu('Navigation')
.addItem('Go to B4', 'jumpToCellB4')
.addToUi();
}
However, I delete and insert rows all the time. This makes it impossible to use the function above, because cells are moving around.
Is there a unique identifier for a cell which can be used to link to, even if rows are inserted or deleted?
onChange()
to add/sub the 4 in B4 using PropertiesService – TheMaster