【发布时间】:2017-07-07 00:20:19
【问题描述】:
当同一行中的其他单元格完成或更改时,我正在尝试向列添加时间戳。
如果只更改一列而不是多列,则以下脚本有效。
function onEdit() {
var s = SpreadsheetApp.getActiveSheet();
if( s.getName() == "Allocation Requests" ) { //checks that we're on the correct sheet
var r = s.getActiveCell();
if( r.getColumn() == 7) { //checks the column
var nextCell = r.offset(0, 7);
nextCell.setValue(new Date());
}
}
}
我正在尝试获取它,以便如果列 E、F、G 或 H 发生更改,则更新列 M 中的时间戳。谢谢
【问题讨论】:
标签: google-apps-script google-sheets timestamp