I want to create a button in my sheet that copies (or cuts and pastes) 'custom items' from one sheet (Daily Lab Orders) to the last row of the finished sheet (Finished 2016) once they're completed. I then want it to delete the row containing the 'custom item'. Logically, I thought I'd select the row, click the button, and the do this over and over for each 'custom item' that is finished.
The snag I've run into is that the script copies only cell A1. It doesn't copy any other values along the first row and it will not copy anything below row 1. A1 is frozen and it is using the function NOW() to constantly update the time.
Below is my script. Any assistance, please? Thank you.*
*The row deletion part of the script hasn't been written yet.
function myFunction() {
var ss = SpreadsheetApp.openById('15yEY5ZX1HyOQFn-BkMXvksivADF3-8g9TnsIEI8aaL8'); //replace with source ID
var source = ss.getSheetByName('Daily Lab Orders 2016'); //replace with source Sheet tab name
var SRange = source.getActiveRange(); //assign the range you want to copy
var SData = SRange.getValues();
var target = ss.getSheetByName('Finished 2016'); //replace with destination Sheet tab name
var last_row = target.getLastRow();
var target_range = target.getRange("A"+(last_row+1)+":G"+(last_row+1))
target.getRange(target.getLastRow()+1, 1, SData.length, SData[0].length).setValues(SData);
}