title: For Loop not moving on when copying a range in same sheet
body: <p>I have a dynamic range that I want to copy in the same worksheet, a certain amount of times depending on the value in a cell</p>
  
  <p>I've tried changing how the for loop works, I've tried adding lastrow ++ but nothing seems to be working. I can't see anything wrong with the code, but there must be something!</p>
  
  <pre><code>function workingDays()
  
  {
      var ss = SpreadsheetApp.getActiveSpreadsheet();
      var Sheet = ss.getSheetByName('Workzone Planning');
      var sessionSheet = ss.getSheetByName('Daily Plan');
      var workDays = Sheet.getRange(4, 6, 7);
      var working = Sheet.getRange('F11').getValue()
      var startRow = workDays.getRow();
  
      Logger.log(working)
  
      for (var a = 0; a &lt; working; a++);
  
  
      var lastRow = sessionSheet.getLastRow();
      var lastCol = sessionSheet.getLastColumn();
      var startCopy = lastRow - 17
  
      var array = sessionSheet.getRange(startCopy, 1, 17, lastCol).activate()
  
      sessionSheet.insertRowsAfter(lastRow, 6)
  
      var currentCell = sessionSheet.getRange(lastRow + 6, 1)
      sessionSheet.getActiveRange().copyTo(currentCell)
  
  }
  </code></pre>
  
  <p>At the moment the cell referred to in F11 is showing 6 so I would expect it to copy the range 6 times ( I actually only want it to copy 5 times, but can sort that after). What its actually doing is only copying it once (though I think it is possibly copying 6 times, but not moving on, so just copying over the top each time)</p>