google apps script - Auto date-stamp across multiple sheets -


i'm very, new @ this. sorry in advance ignorance.

i'm trying auto-fill column date across multiple sheets. have 4 different sheets, , i'm trying automatically have datestamp fill in on first column when data entered second column. i'd exact same action take place on 4 sheets. can 1 sheet @ time, not 4.

i know seems finicky asking script date things us, out our data entry guys quite bit.

this have:

function onedit(event) {      var sheetname = 'customer received',          watchcol = [2],           stampcol = [1],          ind = watchcol.indexof(event.range.columnstart);      if (event.source.getactivesheet()          .getname() !== sheetname ||  ind == -1 || event.range.rowstart < 4) return;     event.source.getactivesheet()              .getrange(event.range.rowstart, stampcol[ind])              .setvalue(event.value ? new date() : null);  } 

this script needs on 1 sheet. tried creating 3 more scripts above, replacing "customer received" other sheet names; resulted in 1 of sheets functioning properly. learned thread below can't multiple onedit scripts 1 sheet, why 1st attempt wasn't working.

google script work across multiple sheets

i got far these 2 threads (plus 1 more can't find now; darn me not bookmarking):

auto-updating column in google spreadsheet showing last modify date

google spreadsheet timestamp?

basically, i've found lot of on website me of answers questions, i'm not way there yet. can of push me rest of way? :) i'm looking possible?

dropping check sheet name make work sheets in particular worksheet

function onedit(event) {      var watchcol = [2],           stampcol = [1],          ind = watchcol.indexof(event.range.columnstart);       if (ind == -1 || event.range.rowstart < 4) return;       event.source.getactivesheet()        .getrange(event.range.rowstart, stampcol[ind])        .setvalue(event.value ? new date() : null);  } 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -