I am new to Script Editing in Google Sheets. I am attempting to create a Timestamp in a cell in rows 31 and 32 when input is received in rows 13 and 19. Row 13 is for inputting names and row 19 is for tracking the projects completion. The names on the projects will change throughout the duration, so once the first name is created in a cell, I want to make sure the Timestamp will not change. Any ideas on how to make this work?
Editable link to an example of the sheet I am creating: https://docs.google.com/spreadsheets/d/1bsA8h0VGudmvB_qHOJrpz4UI9aRvIwRLXR3086rWAVw/edit?usp=sharing
The current script I have created:
function onEdit(e) {
var row = e.range.getRow();
var col = e.range.getColumn();
if(col === 13){
e.source.getActiveSheet().getRange(row,31).setValue(new Date());
if(e.source.getActiveSheet().getRange(row,31).getValue() == ""){
}
}
if(col === 19){
e.source.getActiveSheet().getRange(row,32).setValue(new Date());
}
}