0
votes

I have found a previous post with a Google Sheets script that will be very beneficial for our team, but I am having trouble adjusting it for my needs. Ideally, the user will input an "X" in columns D,F,I,K,N and/or P, and the current time will display in the cell directly to the right. The timestamp should not update on sheet refreshes. Can anyone help? Here is the Google Sheet.

1

1 Answers

0
votes
function onEdit(e) {
if ( e.range.columnStart !== 4 && e.range.columnStart !== 6 
    && e.range.columnStart !== 9 && e.range.columnStart !== 11 
    && e.range.columnStart !== 14 && e.range.columnStart !== 16
    || e.value.toUpperCase() !== 'X') return;
e.range.offset(0, 1)
    .setValue(new Date());
}