Guest User

Untitled

a guest
Jan 20th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. function modifyCell(cellName, increase) {
  2. var range = SpreadsheetApp.getActiveSheet().getRange(cellName);
  3. var toAdd = -1;
  4. if (increase) {
  5. toAdd = 1;
  6. }
  7. range.setValue(range.getValue() + toAdd);
  8. }
  9.  
  10. function increaseCounter() {
  11. modifyCell("I2", true);
  12. }
  13.  
  14. function decreaseCounter() {
  15. modifyCell("I2", false);
  16. }
Add Comment
Please, Sign In to add comment