function insertLastUpdated() { var ss = SpreadsheetApp.getActiveSheet(); var currentRow = ss.getActiveCell().getRow(); var currentCell = ss.getActiveCell().getValue(); var updateRange = ss.getRange('F' + currentRow) //更新日をいれる列をstringで指定。この場合はF列 Logger.log(updateRange); //更新日の記入 if(currentRow>1){ if(currentCell) { updateRange.setValue(new Date()); } } } トリガー トリガーを値の変更にしておくと、シート更新時に上記の機能が走ります。 コメント