I have created a task list. in this task list you can insert you progress. each row is a task and there is 25 rows. in the third column is the progress cell which if this cell has "complete" in it I would like to either automatically of by pushing a button clear content in a range of A:F of each row. So to further explain if I have 5 rows that have complete in them and you then push a clear button it will only clear the content in those five rows and only the cells in columns A:F. I have been able to clear content in one row with a button but not been able to insert the If statement of having "complete" in the cell. Could anyone help. I have this so far but it is currently giving me an error.
function clearRange() {
//replace 'Sheet1' with your actual sheet name
var sheet = SpreadsheetApp.getActive().getSheetByName('TaskList');
if(cellcontent === "Complete"){
sheet.getRange('A26:F26').clearContent();
}
}
Aucun commentaire:
Enregistrer un commentaire