title: The coordinates or dimensions of the range are invalid using variable
body: <p>Using the following function to convert my date output to a Unix Timestamp, however I am receiving the following error:</p>
  
  <blockquote>
    <p>The coordinates or dimensions of the range are invalid. (line 9, file "DateConversion")</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre class="lang-js prettyprint-override"><code>function convertDates(){
    var sheet = SpreadsheetApp.getActiveSheet();
      var rows = sheet.getDataRange();
    var values = rows.getValues();
    for(n=0;n&lt;values.length;++n){
      var cell = values[n][0];
      var cellNew = cell.replace("at ", " ");
      //SpreadsheetApp.getUi().alert(cellNew);
      SpreadsheetApp.getActiveSheet().getRange(Number(n), 0)
    }
  }
  </code></pre>