Skip to main content
deleted 114 characters in body; edited tags; edited title
Source Link
pnuts
  • 17.8k
  • 5
  • 54
  • 103

Creating multiple time stampstimestamps on google sheetsGoogle Sheets to make dependent drop-down boxes work

I read so many forums but cant find an answer to what is likely a simple matter. I need Time Stampstimestamps on 2two different sheets to make 2two different Dependent Drop Boxesdependent drop boxes work. I use the scriptscripts below but can only get 1one sheet to work adand not both sheets. Any help would be really appreciated!:

###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());
    }
  }
}

Creating multiple time stamps on google sheets to make dependent drop-down boxes work

I read so many forums but cant find an answer to what is likely a simple matter. I need Time Stamps on 2 different sheets to make 2 different Dependent Drop Boxes work. I use the script below but can only get 1 sheet to work ad not both sheets. Any help would be really appreciated!

###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());
    }
  }
}

Creating multiple timestamps on Google Sheets to make dependent drop-down boxes work

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());
    }
  }
}
added 140 characters in body
Source Link
Sathyajith Bhat
  • 10.9k
  • 8
  • 48
  • 78

I read so many forums but cant find an answer to what is likely a simple matter. I need Time Stamps on 2 different sheets to make 2 different Dependent Drop Boxes work. I use the script below but can only get 1 sheet to work ad not both sheets. Any help would be really appreciated!

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 ###Script time in

function onEdit(event) {

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());
    }
  }
}

//SETTINGS var tsheet = 'Out'; var lcol = 2; var rcol = 8; var tcol = 9; // ###Script Time out

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()); } } }

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());
    }
  }
}

I read so many forums but cant find an answer to what is likely a simple matter. I need Time Stamps on 2 different sheets to make 2 different Dependent Drop Boxes work. I use the script below but can only get 1 sheet to work ad not both sheets. Any help would be really appreciated!

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()); } } }

I read so many forums but cant find an answer to what is likely a simple matter. I need Time Stamps on 2 different sheets to make 2 different Dependent Drop Boxes work. I use the script below but can only get 1 sheet to work ad not both sheets. Any help would be really appreciated!

###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());
    }
  }
}
Source Link
Loading