In a google sheet, this simple script works to select a single cell, then click a button to decrease the value in the selected cell by 1:
function tally() {
var cell = SpreadsheetApp.getActiveSheet().getActiveCell();
var value = cell.getValue();
cell.setValue(value-1);
}
Is there a way to do a multiple selection - i.e., select multiple / scattered cells in a table, then iterate the function in each of the selected cells?