I would like to make a function that will create a timestamp whenever a particular keyword is mentioned in a specified array. For example, if the array included the word "Item 1" in a cell, create a timestamp when it was populated in the sheet. Then if the next last line contains the word "Item 2" in a cell, create a timestamp when is was populated in the sheet. I assume I will need an if statement or for loop to perform the function. A portion of my script is below as reference:
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet1 = ss.getSheetByName('Form Response Data');
var sheet4 = ss.getSheetByName('Dewar ID');
var last_dewar = sheet4.getRange('A3:A50').getValues();
var last_entry = sheet1.getRange(sheet1.getLastRow(),1,1,sheet1.getLastColumn()).getValues();
Is keyword in array?