title: scripting a button to make a new sheet with a specific name, and autofilling the selected cell + 1 above and 4 more cells to the right
body: <p>I've been struggling for a while now to make a script, which can locate the selected cell, and copy text into it.<br>
  My script should, in the end be able to make an extra sheet with a specific name and autofill 5 columns to the right of a seleceted cell (including the selected cell) + 1 merged cell above.<br>
  All the autofilled code will refer to the new sheets.<br>
  All this should be done by pushing a button after selecting the desired location.</p>
  
  <p>I've been copying text from different websites' Q&amp;A, youtube videos and google apps scripts, and this is what I came up with so far.:</p>
  
  <pre><code>function buttonClick() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var naame = Browser.inputBox("Test type / name");
  
    try {
      ss.setActiveSheet(ss.getSheetByName(naame));
    } 
  
    catch (e) {
      ss.insertSheet(naame);
    }
  
    var activeRange = ss.getActiveRange();
    var cell, cellValue, cellFormula;
  
    // iterate through all cells in the active range
    for (var cellRow = 1; cellRow &lt;= activeRange.getHeight(); cellRow++) {
      for (var cellColumn = 1; cellColumn &lt;= activeRange.getWidth(); cellColumn++) {
        cell = activeRange.getCell(cellRow, cellColumn);
  
        /**
        Here I'm trying different things to copy some text to the selected cell.
        //cell.copyTo(SpreadsheetApp.getActiveSheet().getRange(1,6));
        SpreadsheetApp.getActive().getRange(1.6).copyTo(cell);
        */    
      } 
    }
  }
  </code></pre>