Skip to main content
added 153 characters in body
Source Link
Alex
  • 22.8k
  • 12
  • 83
  • 104

This is my script, put in the last column this information:

  1. Insert into the Cell (In the last cell = lastcolumn for the row that you modify) - Date in GMT -3, if you want to put the same in other TZ just modify the -3 for you concurrent timezone.

    Insert into the Cell (in the last cell = lastcolumn for the row that you modify) - Date in GMT -3, if you want to put the same in other TZ just modify the -3 for you concurrent timezone. If you want to put the date automatically in your default TZ, just modify this:

    If you want to put the date automatically in your default TZ, just modify this:
     var date = Utilities.formatDate(new Date(), "GMT-3", "dd/MM/yyyy HH:mm");
     to
     var date = Utilities.formatDate(new Date());
    
  2. Insert a Comment with the Cell+User who modify it.

  3. Appear a popup when you update something. Only appear to the ActiveUser.

     function onEdit(event)
     {
         var ss = SpreadsheetApp.getActiveSpreadsheet();
         var actSht = event.source.getActiveSheet();
         var actRng = event.source.getActiveRange();
    
         var index = actRng.getRowIndex();
         var dateCol = actSht.getLastColumn();
         var lastCell = actSht.getRange(index,dateCol);
         var date = Utilities.formatDate(new Date(), "GMT-3", "dd/MM/yyyy HH:mm");
    
         lastCell.setValue(date);
         lastCell.setComment("Ultima Modificacion: " + actRng.getA1Notation() +' por '+Session.getActiveUser());
         ss.toast('Ultima Modificacion = '+ actRng.getA1Notation()+' por '+Session.getActiveUser());
     }
    

var date = Utilities.formatDate(new Date(), "GMT-3", "dd/MM/yyyy HH:mm"); to var date = Utilities.formatDate(new Date());

  1. Insert a Comment with the Cell+User who modify it.
  2. Appear a popup when you update something. Only appear to the ActiveUser.

function onEdit(event) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var actSht = event.source.getActiveSheet(); var actRng = event.source.getActiveRange();

var index = actRng.getRowIndex(); var dateCol = actSht.getLastColumn(); var lastCell = actSht.getRange(index,dateCol); var date = Utilities.formatDate(new Date(), "GMT-3", "dd/MM/yyyy HH:mm");

lastCell.setValue(date); lastCell.setComment("Ultima Modificacion: " + actRng.getA1Notation() +' por '+Session.getActiveUser()); ss.toast('Ultima Modificacion = '+ actRng.getA1Notation()+' por '+Session.getActiveUser()); }

This is my script, put in the last column this information:

  1. Insert into the Cell (In the last cell = lastcolumn for the row that you modify) - Date in GMT -3, if you want to put the same in other TZ just modify the -3 for you concurrent timezone. If you want to put the date automatically in your default TZ, just modify this:

var date = Utilities.formatDate(new Date(), "GMT-3", "dd/MM/yyyy HH:mm"); to var date = Utilities.formatDate(new Date());

  1. Insert a Comment with the Cell+User who modify it.
  2. Appear a popup when you update something. Only appear to the ActiveUser.

function onEdit(event) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var actSht = event.source.getActiveSheet(); var actRng = event.source.getActiveRange();

var index = actRng.getRowIndex(); var dateCol = actSht.getLastColumn(); var lastCell = actSht.getRange(index,dateCol); var date = Utilities.formatDate(new Date(), "GMT-3", "dd/MM/yyyy HH:mm");

lastCell.setValue(date); lastCell.setComment("Ultima Modificacion: " + actRng.getA1Notation() +' por '+Session.getActiveUser()); ss.toast('Ultima Modificacion = '+ actRng.getA1Notation()+' por '+Session.getActiveUser()); }

This is my script, put in the last column this information:

  1. Insert into the Cell (in the last cell = lastcolumn for the row that you modify) - Date in GMT -3, if you want to put the same in other TZ just modify the -3 for you concurrent timezone. If you want to put the date automatically in your default TZ, just modify this:

     var date = Utilities.formatDate(new Date(), "GMT-3", "dd/MM/yyyy HH:mm");
     to
     var date = Utilities.formatDate(new Date());
    
  2. Insert a Comment with the Cell+User who modify it.

  3. Appear a popup when you update something. Only appear to the ActiveUser.

     function onEdit(event)
     {
         var ss = SpreadsheetApp.getActiveSpreadsheet();
         var actSht = event.source.getActiveSheet();
         var actRng = event.source.getActiveRange();
    
         var index = actRng.getRowIndex();
         var dateCol = actSht.getLastColumn();
         var lastCell = actSht.getRange(index,dateCol);
         var date = Utilities.formatDate(new Date(), "GMT-3", "dd/MM/yyyy HH:mm");
    
         lastCell.setValue(date);
         lastCell.setComment("Ultima Modificacion: " + actRng.getA1Notation() +' por '+Session.getActiveUser());
         ss.toast('Ultima Modificacion = '+ actRng.getA1Notation()+' por '+Session.getActiveUser());
     }
    
Source Link

This is my script, put in the last column this information:

  1. Insert into the Cell (In the last cell = lastcolumn for the row that you modify) - Date in GMT -3, if you want to put the same in other TZ just modify the -3 for you concurrent timezone. If you want to put the date automatically in your default TZ, just modify this:

var date = Utilities.formatDate(new Date(), "GMT-3", "dd/MM/yyyy HH:mm"); to var date = Utilities.formatDate(new Date());

  1. Insert a Comment with the Cell+User who modify it.
  2. Appear a popup when you update something. Only appear to the ActiveUser.

function onEdit(event) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var actSht = event.source.getActiveSheet(); var actRng = event.source.getActiveRange();

var index = actRng.getRowIndex(); var dateCol = actSht.getLastColumn(); var lastCell = actSht.getRange(index,dateCol); var date = Utilities.formatDate(new Date(), "GMT-3", "dd/MM/yyyy HH:mm");

lastCell.setValue(date); lastCell.setComment("Ultima Modificacion: " + actRng.getA1Notation() +' por '+Session.getActiveUser()); ss.toast('Ultima Modificacion = '+ actRng.getA1Notation()+' por '+Session.getActiveUser()); }