title: copy paste range into next column and update
body: <p>column B gets data updated</p>
  <p>column C onwards is used to store consolidated data</p>
  <p>im trying to copy a range of data to right next column</p>
  <p>and update column C with data from column B</p>
  <pre><code>function doUpBCL() {
    
    var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('BLC');
  
    var data_new = ss.getRange('B1').getDisplayValue();  
    var data_old = ss.getRange('C1').getDisplayValue();  
  
    if( data_new !== data_old )  // check if data changed
    {
  
    var lr = ss.getLastRow();
    var lc = ss.getLastColumn();
      
    var data = ss.getRange(1,3,lr,lc - 3).getValues();
    ss.getRange(1,4,lr,lc - 4).setValues(data);
  
    var data_ = ss.getRange(lr,2,1,1).getValues();
    ss.getRange(lr,3,1,1).setValues(data_);
      
    }   
  
  };
  </code></pre>
  <p>macro (created by Google Sheets) as EXAMPLE to ilustrate what i want is (i need help with above function, not this)</p>
  <pre><code>function upblc_macro() {
    var spreadsheet = SpreadsheetApp.getActive();
    spreadsheet.setActiveSheet(spreadsheet.getSheetByName('BLC'), true);
    spreadsheet.getRange('D:D').activate();
    spreadsheet.getRange('C:Z').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
    spreadsheet.getRange('C:C').activate();
    spreadsheet.getRange('B:B').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
  };
  </code></pre>
  <p>using last row cos im going to use similar funcions to other pages and im trying to funcion where i dont have to adjust everytime</p>
  <p>simply add new column, move or append to last column wont work the way i need</p>
  <p>help is much appreciated, thanks</p>