title: Google Sheets Script Editor runs simple script slowly
body: <p>I've done this simple script to tick checkboxes automatically upon data entry of certain names.
  It works well but it seems very slow (a full second, maybe more) for such a simple script.
  I was wondering if there was a more efficient/elegant/quicker way to write this, I'm an absolute beginner with JS and coding in general and I'd like advice on how to write this more efficiently for Google Scripts.</p>
  <p>The two conditions are to prevent the macro from firing if the name is input in another column, and the else statement simply to correct quickly if the wrong name is entered, as the target cell is linked to a lot of conditional formatting.</p>
  <p>The script is</p>
  <pre><code>function onEdit() {
    var current = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getCurrentCell();
    var name = current.getValue();
    var nameRow = current.getColumn();
  
    if(name == &quot;Russell&quot; &amp;&amp; nameRow == 7) {
      current.offset(0,6).setValue(true);
    }
    else if(nameRow == 7) {
      current.offset(0,6).setValue(false);
    }
  }
  </code></pre>
  <p>Thank you!</p>