I have 2 scripts in the same project but it seems that only one is working, not specific but depending on the time I add the script, it is like the last script Im adding disabling the other.
these are the 2 scripts (I copied from google forum and updated according to my needs):
- adding an auto time stamp to a cell when specified range is not empty:
function onEdit(event) {
var sp = SpreadsheetApp.getActiveSheet();
var c = sp.getActiveCell();
if (c.getColumn() < 9 && sp.getName()=='QUE') {
var celladdresp ='I'+ c.getRowIndex()
sp.getRange(celladdresp).setValue(new Date()).setNumberFormat("dd/mm/yy hh:mm");
}
};
- copy a row to another sheet on the same file if checkbox is checked (=true):
function onEdit(event) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = event.source.getActiveSheet();
var r = event.source.getActiveRange();
if(s.getName() == "QUE" && r.getColumn() == 12 && r.getValue() == true) { var row = r.getRow();
var numColumns = s.getLastColumn();
var targetSheet = ss.getSheetByName("QUE2");
var target = targetSheet.getRange(targetSheet.getLastRow() + 1, 1);
s.getRange(row, 1, 1, numColumns-2).copyTo(target);
}
};
Your help understanding why they dont work together will be appreciated. *BTW I tried to Enable/Disable new apps scriptspowered by chrome v8 but did not helped