1 回答

TA貢獻(xiàn)1790條經(jīng)驗(yàn) 獲得超9個(gè)贊
如果刪除條件 (if),您發(fā)布的腳本應(yīng)該可以正常工作,因?yàn)槟幌雽⑵湎拗茷樘囟小@纾?/p>
function onEdit(e){
var sh=e.range.getSheet();
var A1=e.range.getA1Notation();
var editDate = Utilities.formatDate(new Date(),Session.getScriptTimeZone(),"MM/dd/yyyy HH:mm:ss");
var nextCell = e.range.offset(0, 1);
nextCell.setValue(editDate);
var newNote=Utilities.formatString('Last Modified: %s / Updated Cell: %s / Updated Cell Value: %s / Associated Date Cell: %s / Associated Date Cell Value: %s\n',editDate,A1,e.value,nextCell.getA1Notation(),editDate);
nextCell.setNote(nextCell.getNote() + newNote);
}
添加回答
舉報(bào)