Hello friends,
I'm stuck with this problem for a few hours now and I'm out of ideas. As of right now, I'm able to get it to comment a date and time to the latest modified cell. But it adds it to all cells making the sheet quite difficult to read.
Here's what I have so far:
function onEdit()
{
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var cell = sheet.getActiveCell();
var comments = cell.getComment();
if(sheet.match("text")){
comments = comments + "Modified: " + (new Date());
cell.setComment(comments);
}
}
I can't seem to get the if function to work. What do I need to change? Thanks in advance.

