I need timestamps on two different sheets to make two different dependent drop boxes work. I use the scripts below but can only get one sheet to work and not both sheets:
Script time in
function onEdit(event) {
//SETTINGS
var tsheet = 'In';
var lcol = 2;
var rcol = 8;
var tcol = 9;
//
var s = event.source.getActiveSheet();
var sname = s.getName();
if (sname == 'In') {
var r = event.source.getActiveRange();
var scol = r.getColumn();
if (scol>= lcol<=rcol) {
s.getRange(r.getRow(), tcol).setValue(new Date());
}
}
}
Script Time out
function onEdit(event) {
//SETTINGS
var tsheet = 'Out';
var lcol = 2;
var rcol = 8;
var tcol = 9;
//
var s = event.source.getActiveSheet();
var sname = s.getName();
if (sname == 'Out') {
var r = event.source.getActiveRange();
var scol = r.getColumn();
if (scol>= lcol<=rcol) {
s.getRange(r.getRow(), tcol).setValue(new Date());
}
}
}