Skip to main content
Share Your Experience: Take the 2024 Developer Survey
1 vote

Macro to return 1 + the value of the cell above

Macro /** @OnlyCurrentDoc */ function myFunction() { const cell = SpreadsheetApp.getActive().getCurrentCell(); cell.setValue(cell.offset(-1, 0).getValue()+1); cell.offset(0, 1).activate(); } ...
Blindspots's user avatar
  • 5,648
1 vote
Accepted

Replace text in document using A1 notation as variable names in order to retrieve values stored in those cell references

const docId = "xyz"; const sheetId = "abc"; function replaceRefByString() { const doc = DocumentApp.openById(docId) const body = doc.getBody(); const ss = SpreadsheetApp....
Blindspots's user avatar
  • 5,648

Only top scored, non community-wiki answers of a minimum length are eligible