title: Google Script to copy the values of a column and insert a new column in spreadsheet
body: <p>I have started creating a spreadsheet to monitor some results from facebook, youtube etc... A lot of things I did I was able to learn from previous answers on this site. </p>
  
  <p>Now I am stuck with trying to find a script which can help me do the following:</p>
  
  <p>Column A contains the description of the metric<br>
  Column B contains the formula which pulls the metric from extrenal sources (e.g. number of likes of my facbeook page, number of video views of my YT channel)  </p>
  
  <p>I would like to have a script which runs every Monday and performs the following actions:  </p>
  
  <ol>
  <li>Insert a new column between column B and column C (moving all columns after B down by 1 place)  </li>
  <li>Copy column B and paste only the values (not the formulas) in the new empty column C</li>
  <li>Write something like Week Commencing YYYY/MM/DD on top of Column C (C1) where YYYY/MM/DD is the date of the previous week's monday</li>
  </ol>
  
  <p>I have tried a modified version of this (from <a href="http://www.kraukoblog.com/marketing/tutorial-watch-your-competitors-facebook-pages-with-google-docs/" rel="noreferrer">http://www.kraukoblog.com/marketing/tutorial-watch-your-competitors-facebook-pages-with-google-docs/</a>):  </p>
  
  <pre><code>function UpdateFblikes() {
    var sheet =SpreadsheetApp.getActiveSheet(); //define spreadsheet name
    var column = sheet.getRange("O1").getValue();
    var row = 4;
     Utilities.sleep(4000);  // Slowdown the script (4 second)
     var nblike = sheet.getRange("E4:E60"); // Select and copy the column
     nblike.copyValuesToRange(sheet, column+5, column+5, row, row+56); // Paste the data
    sheet.getRange(3, column+5).setValue(new Date()); // add date in column title
     sheet.getRange("O1").setValue(column+1);  // Incremente variable
  }
  </code></pre>
  
  <p>But it only writes the date in the column.</p>
  
  <p>This would enable me to compare the weekly changes in those metrics.</p>
  
  <p>Is this possible at all?</p>