Skip to content

Instantly share code, notes, and snippets.

@snay2
Created June 21, 2011 22:52
Show Gist options
  • Save snay2/1039165 to your computer and use it in GitHub Desktop.
Save snay2/1039165 to your computer and use it in GitHub Desktop.
Simple Apps Script example to increment a cell
function incrementA1() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[2];
var oldValue = sheet.getRange("A1").getValue();
sheet.getRange("A1").setValue(oldValue + 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment