Reputation: 959
How can i set the current timestamp NOW()
, p.e. in A1
, if i change a value in a column (A2-A100
).
It s imported that the timestamp stays unchanged as long nothing is changed.
Upvotes: 0
Views: 101
Reputation: 27242
You will have to use a google apps script for that. Consider below script as an example: it 'stamps' cell A1 (of sheet1) when edits are made in Col A (of sheet1) Change the sheet name, paste it in the script editor and try doing some edits in col A to see if the stamp appears (format cell A1 as date or date/time as you wish). Do not try to run this script from the script editor..
function onEdit(e) {
var sheetName = 'Sheet1'; //name of the sheet the script should work on
var colToWatch = 1 // columnn of the edits
var stampCell = 'A1';
if (e.range.columnStart !== 1 || e.source.getActiveSheet()
.getName() !== sheetName || e.range.rowStart ===1) return;
e.source.getActiveSheet()
.getRange(stampCell)
.setValue(e.value ? new Date() : null);
}
Upvotes: 1