I am trying to figure out how to create a date stamps, that get modification anytime a change is done in a cell. I am also very new to Google App Script (everybody needs to start somewhere).
I found the following code on how to create the date stamp :
function onEdit() {
var s = SpreadsheetApp.getActiveSheet();
if( s.getName() == "Test" ) { //checks that we're on Sheet1 or not
var r = s.getActiveCell();
if( r.getColumn() == 8 ) { //checks that the cell being edited is in column A
var nextCell = r.offset(0, -1);
if( nextCell.getValue() === '' ) //checks if the adjacent cell is empty or not?
nextCell.setValue(new Date());
}
}
}
which work for adding the date stamp in the column G, for any data filled in column H.
But if I wanna change the data in H2 for any value, the date in G2 stay the same.
Anybody could make suggestions please.
But if I wanna change the data in H2 for any value, the date in G2 stay the same.Can you provide some images show examples of what you want? - Cooper