I am creating a simple inventory management system using google sheets and am trying to automate using some of the scripting tools available. In this I am trying to create links to other cells so that when you enter an inventory update you can click the link to take your cursor to the updated item. This is the code for the link
var link = "#grid=" + s.getIndex() + "&range=" + s.getRange('A' + (i + 16).toString()).getA1Notation();
var formula = '=HYPERLINK("' + link + '", "Go to")';
console.log(formula); s.getRange('E3').setFormula(formula).setBackground(null);
This creates a hyperlink with the generated link but clicking it throws the error given in the title. Later in the code I use a clear content on A3. Would it be possible that that interferes with the entire row?
So far my attempts have been minimal because I am struggling to find links even to the error. Any insight is greatly appreciated. Thank you.