[GAS][スプレッドシート]行ごとに更新日時を挿入するには: 逆引きGoogle Apps Script 2012 年 7 月 1 日 日曜日 以下のような表において、それぞれの行が更新されるたびに、行末尾に更新日時を挿入するサンプルスクリプト。 function insertLastUpdated() { var sheet = SpreadsheetApp.getActiveSheet(); var currentRow = sheet.getActiveCell().getRow(); if(currentRow>1){ sheet.getRange('C' + currentRow).setValue(new Date()); } } サンプルスクリプトの解説 行3:更新日時を挿入する場所を判断するため、あらかじめアクティブセル(カーソルがあたっているセル)の行番号を取得している