I'm trying to make a script that reads a specific column(B), checking each cell for "is this value < 120?".
If the value is < 120, I want the script to add a value of "1" to the corresponding cell in a different column(E).
This is what I've come up with so far, but it's not working and I can't figure out why.
function quota1() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Roster");
var workingCell = sheet.getRange("B:B").getValue();
if(workingCell < 120){
sheet.getrange("E:E").add(1);
}
}
If col2 less 120 increment column 5 by 1
Before:
After: