title: Copy formula to range. Google Spreadsheet
body: <p>I currently have this script :</p>
  
  <pre><code>function addConsultant()
  {
  var sheet_staffing = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Staffing"); 
  var sheet_parametres = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Parametres");
  var range_tabConsultant_default = sheet_parametres.getRange(26,1,6,64);
  var row_position_newTab = sheet_parametres.getRange(1,1).getValue();
  range_tabConsultant_default.copyFormatToRange(sheet_staffing, 1, 36, row_position_newTab, row_position_newTab + 6);
  range_tabConsultant_default.copyValuesToRange(sheet_staffing, 1, 36, row_position_newTab, row_position_newTab + 6);
  sheet_parametres.getRange(1,1).setValue(row_position_newTab+6);
  }
  </code></pre>
  
  <p>This is like a default tab, their is one tab per person, but I dont know how to copy formulas from def tab to tab created by script. Can someone help me with this?</p>