I was able to modify if in any column within column 1 through 9 was modified the time stamp was entered on column 10 and last modified on column 11.
I know need to get granular and timestamp when each column is first modified, while maintaining the existing timestamp setting.
I believe this is as simple as an "if" statement but I can't seem to figure it out.
Here is what I have so far. This gives me the date and time any cell, between column 1 and 9 is first modified, on that row and returns date and time on column 10, then last modified date and time on column 11 if any changes are done. Now i want to keep record of when column 1-9 are first modified as well, and enter them on the same sheet starting at column 12
function addTimestamp (e){
//variables
var startRow = 2;
var ws = "Daily Log"
var currentDate = 1
//get modified row and column
var row = e.range.getRow();
var col = e.range.getColumn();
if(([1,2,3,4,5,6,7,8,9].includes(col))&& row >= startRow
&&e.source.getActiveSheet().getName() ==ws){
var currentDate = new Date();
e.source.getActiveSheet().getRange(row, 11).setValue(currentDate);
if(e.source.getActiveSheet().getRange(row, 10).getValue()== ""){
e.source.getActiveSheet().getRange(row,10).setValue(currentDate);
} // END IF check if date created exists
} // END IF column, row, worksheet
}
Special thanks to @raygun who helped me in creating uniq driver IDs.