mercredi 10 août 2022

Clear cells when checking a checkbox

I had this spreadsheet/script combo working perfectly, then made some visual/organization changes, and now it's not and I'm stumped why.

On the 1st sheet 'Filter' the checkbox in G1 is supposed to clear all of the cells in row 3 (which are my filter conditions).

Any pointers what I'm missing are appreciated!

https://docs.google.com/spreadsheets/d/1syLb6XaAWzmDecMzKWP9TpxZrMprYhLxBqQ4E8hTmmM/edit?usp=sharing

I'm not sure if you're able to view the script or not – here's what I've got currently:

function onEdit(e) {
  if (e.range.columnStart === 7 && e.range.getValue() === TRUE)
    ClearCells();
}

function ClearCells() {
 var sheet = SpreadsheetApp.getActive().getSheetByName('Filter');
 sheet.getRange('A3:F3').clearContent();
}



Aucun commentaire:

Enregistrer un commentaire