Google sheet date of last revision in a row -


help! in google sheets, want 1 column input last date , time cell in row updated or revised. example: a1 - should last revision date, b1-z1 (any number of cells after a1) - everytime cell in row updated or revised, a1 date updated.

i want apply same script more 1 sheet.

i've found script, seemed work fine, initially:

function onedit(event){   var ss = spreadsheetapp.getactivespreadsheet();     //script last update timing    var actsht = event.source.getactivesheet();   var actrng = event.source.getactiverange();    var activecell = actsht.getactivecell();   var row = activecell.getrow();   var column = activecell.getcolumn();    if(row < 2)   return; //if header row return     var colnums  = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,  20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34]; //coulmns, edit considered   if(colnums.indexof(column) == -1) return; //if column other considered return     var index = actrng.getrowindex();   var datecol = actsht.getlastcolumn();   var lastcell = actsht.getrange(index,datecol);   var date = utilities.formatdate(new date(), "gmt+5:30", "dd/mm/yyyy hh:mm:ss");   // note: insert date when update row in last coulmn   lastcell.setvalue(date); } 

when testing it, worked fine, after day wasn't working or works, or works when revisions myself doesn't work person/s sharing file with.

i don't know scripting after week of searching, have opted post, hoping can lead me right direction.

any appreciated! thank in advance!

see if helps:

function onedit(e) { if (e.range.columnstart < 5 || e.range.rowstart < 21) return; e.source.getactivesheet().getrange(e.range.rowstart, 1) //first col     .setvalue(utilities.formatdate(new date(), "gmt+5:30", "dd/mm/yyyy hh:mm:ss")); } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -