I am trying to create a spreadsheet to keep track of event attendance of a group of people.
Column 1 contains the attendee's name.
Column 2 contains a dropdown menu with 3 options: Confirmed,Maybe,Unable.
Column 3 contains a value of the number of events the person has attended.
I am trying to create a function that I can attach to a button. By clicking the button, I would like to increase the value of column 3 by 1, IF the value in column 2 is "Confirmed"
I found a similar question and somebody answered to use the following script, but this was just for 1 specific cell, and there were no additional variables:
function increment() {
SpreadsheetApp.getActiveSheet().getRange('A1').setValue(SpreadsheetApp.getActiveSheet().getRange('A1').getValue() + 1);
}
How can I modify the above script to increase the value of all my cells in Column 3 by 1 if the value of column 2 in the same row is "Confirmed"?