I am trying to make a macro to add 1 to a single cell in google sheets WITHOUT CLICKING, and with a keyboard. Let me explain exactly what I'm trying to do overall:
I'm attempting to tally a total of 20 different values. I have to do this around 1200 times, per row. so I would like to be able to press 1 on my keyboard (or control shift 1 or whatever the macro allows me to do) to add +1 to column 1, and press 2 on my keyboard to add +1 to column 2, and so on and so forth. I have found solutions to add on screen buttons, but I would prefer if I could just press a single key on my keyboard. if thats not possible, thats ok, I am relativley new to sheets
Yall gonna make fun of me but I tried to do
/** @OnlyCurrentDoc */
function roll1() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('C3').activate();
spreadsheet.getCurrentCell().setValue(+1);
};
and it just set the cell value to 1 instead of adding 1 to the value