I\'m trying to figure out how to retrieve the index of a column with a specific name in a Google Spreadsheet script.
I\'m working on a custom Google Script that auto
This was easier than I thought! Between the last 2 brackets:
var dateCol = headers[0].indexOf('Updated By');
if (dateCol > -1 && index > 1) { // only timestamp if 'Updated By' header exists, but not in the header row itself!
var cell = sheet.getRange(index, dateCol + 1);
var Who = Session.getActiveUser();
cell.setValue(Who);
}