100 high impact copy pasteable Google Sheets Apps Script snippets

100 high-impact, copy-pasteable Google Sheets Apps Script snippets How to use A. Setup & Quality-of-Life 1) Add a Custom Menu Creates a “Sheet Tools” menu with quick actions. function onOpen() { SpreadsheetApp.getUi() .createMenu(‘Sheet Tools’) .addItem(‘Clear Selected Range’, ‘clearSelectedRange’) .addItem(‘Timestamp Selected Cells’, ‘timestampSelection’) .addToUi(); } function clearSelectedRange() { const range = SpreadsheetApp.getActiveRange(); if (range) range.clearContent(); } ...