As said in the title simply, I have a check box at Cell A1, I want to check it and uncheck it manually to hide a few rows in the sheets, say row 2,3. I've drafted the code below, what am i doing wrong?
function onEdit(e) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
if (sheet.getCell(1,A).isChecked() === 'TRUE');
if (e.value == "TRUE") {
SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().hiderows(2, 3);
}
else if (e.value == "FALSE") {
SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().showColumns(2, 3);
}
}
Error says
Error
ReferenceError: A is not defined