Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function modifyCell(cellName, increase) {
- var range = SpreadsheetApp.getActiveSheet().getRange(cellName);
- var toAdd = -1;
- if (increase) {
- toAdd = 1;
- }
- range.setValue(range.getValue() + toAdd);
- }
- function increaseCounter() {
- modifyCell("I2", true);
- }
- function decreaseCounter() {
- modifyCell("I2", false);
- }
Add Comment
Please, Sign In to add comment