title: Google Spreadsheets - Set tab name in a variable
body: <p>I have this code here:</p>
  
  <pre><code>function onEdit(e) {
    var sheet      = e.source.getActiveSheet();
    var activeCell = sheet.getActiveCell();
    var col        = activeCell.getColumn();
    var row        = activeCell.getRow();
    if (col == 4 )
      sheet.getRange(row, col+1).setValue(new Date()).setNumberFormat('MMM,dd');
    }
  }
  </code></pre>
  
  <p>How do I replace this <code>var sheet = e.source.getActiveSheet();</code> to a fixed tab name? Because I want this function to execute only in a specific Tab of my sheet, and not in all of them.</p>
  
  <p>Example: I have a spreadsheet with 2 tabs: Test Cases and another one called Summary ... I want this script to update ONLY the Test Cases tab, not the summary one .</p>
  
  <p>I tried: <code>if (col == 3 &amp;&amp; sheet == 'Test Cases')</code> but it did not work ... thanks!</p>