I have a problem as follows. if cell A6 is checked then cell G6 will be set to 0.5 and the rest is 0 and i want to automatic do that This is my table And this is my code . I really appreciate that
function setvalues() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
if (sheet.getRange('A6').isChecked() === 'TRUE') {
sheet.getRange('I6').setValue(0.5);
} else {
sheet.getRange('G6').setValue(0);
}
}
function setvalues() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
if (sheet.getRange('A6').isChecked()) {
sheet.getRange('I6').setValue(0.5);
} else {
sheet.getRange('G6').setValue(0);
}
}