0

I am using Google sheets and have a cell that has data validation and I am putting check boxes (I4:I) for people when items are received, they need to be changed to "False" when the Data Validation cell (C2) is changed.

I'm new at this, but this is what I have, but I am getting a syntax error on Line 5.

function onEdit(e){
  if(e.range.getC2Notation() == 'C2' && 
      e.range.getSheet().getName() == 'Outbound Parts'
    ) 
    e.source.getRange('I4:I'),"FALSE"
}

Any help would be appreciated.

1

1 Answer 1

1

You can fix the code like this:

function onEdit(e) {
  const sheet = e.range.getSheet();
  if (e.range.getA1Notation() !== 'C2'
    || sheet.getName() !== 'Outbound Parts') {
    return;
  }
  sheet.getRange('I4:I').setValue(false);
}
1
  • That worked! Thank you so much. Commented Jul 14, 2021 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.