Access the system! https://docs.google.com/spreadsheets/d/1zUsfln_8zvVRlsMNUL08lQHyxXND5pm6q1YplBW_nb8/edit?usp=sharing
2. You’ll see this pop-up, then just click on make a copy (this makes a copy of the Google Sheets as well as the code automatically).
3. After making a copy, when you click on any of the “add tally” or “subtract tally” buttons, it shows an “Authorization Required” pop-up. Click continue and click on your Google Account.
And that’s it!
You don't need to do anything to make the code work, as when you copy the spreadsheet the code is already copied (if you follow the documentation). However, if you want to understand how this works or edit it, feel free to look at this section :)
Essentially, how this works is that there are functions, that when executed, increase or decrease the value of a number by one (depending if it's add or subtract tally).
Each button is assigned to a specific function depending on the cell positions of the tallies they are editing.
For example in the following code blocks below, the function add1 adds the tally at the position of cell C4, while the function of subtract4 subtracts the tally at position of cell C25.
(Credits to Shreyas Kapur on stackoverflow for reference regarding the code to add values (https://stackoverflow.com/a/32816451)
SpreadsheetApp.getActiveSheet().getRange('C4').setValue(SpreadsheetApp.getActiveSheet().getRange('C4').getValue() + 1);
}
function subtract4() {
SpreadsheetApp.getActiveSheet().getRange('C25').setValue(SpreadsheetApp.getActiveSheet().getRange('C25').getValue() - 1);
}
Note: This method is editing specified rows, so let's say if you have many more rows and you want to make it automatic that each button modifies its own rows without adding even more code, you can check out this answer at stackoverflow (https://stackoverflow.com/a/64976479)
If you want to further edit the code to your own liking, you can edit it via the apps script tab in Google Sheets!