So recently, Google added the feature where you can hyperlink to a specific cell, which is great. To do so, you use the \"Insert link\" feature on a specific cell, and then from
This is a perfect use case for named ranges, and it doesn't require any change to your script logic.
var range = ss.getRangeByName("NamedRange1");
You can use a relative url. The answer in a linked document can be found here https://webapps.stackexchange.com/questions/44473/link-to-a-cell-in-a-google-sheets-via-url.
=hyperlink("#gid=0&range=A2",Bookmarks!A2)
I think #gid=0 represents the first sheet. Then I can specify the range in the sheet. I was unable to get named sheets working. Besides the first sheet/tab the others all have a #gid which you can find in the url of that sheet.
=hyperlink("#gid=1756281106&range=A2",Bookmarks!A2)