Google Sheets Timestamp – Automatically Set ‘Last Updated’ Cell

google sheetsgoogle-apps-scriptgoogle-sheets-timestamp

How can I automatically set "last updated" cell in row Google Docs Spreadsheets ?

I want to create a column where the cells' value will be automatically set to when that row was last amended. Is this possible? How do I do this / what option do I use to set this?

I see a workaround for MS Excel but I think Google Docs should have something similar, right? (fingers crossed)

We have multiple people editing a large sheet. We can see revision history, but it would be nicer if we had a column of "last updated" dates as well.

Best Answer

You can try adding a Google Apps Script to capture when a cell is edited and add a timestamp to a different cell. Here's a previous answer that is similar: Google Spreadsheet Timestamp?

function onEdit() {
 var s = SpreadsheetApp.getActiveSheet();
 if( s.getName() == "Sheet1" ) { //checks that we're on the correct sheet
   var r = s.getActiveCell();
   if( r.getColumn() == 13 ) { //checks the column
     var nextCell = r.offset(0, 1);
     if( nextCell.getValue() === '' ) //is empty?
       var time = new Date();
       time = Utilities.formatDate(time, "GMT", "HH:mm:ss");
       nextCell.setValue(time);
   };
 };
}