如果有人好奇,我没有找到的东西,对我的作品:
function onEdit() {
var s = SpreadsheetApp.getActiveSheet();
var r = s.getActiveCell();
if(r.getColumn() == 2, r.getValue()==='Appointment') {
var nextCell = r.offset(0, 5);//offset (row,column)
if(nextCell.getValue() === '')//checks for blank cell
nextCell.setValue(new Date());}
else if(r.getColumn() == 2, r.getValue()==='Proposals') {
var nextCell = r.offset(0, 6);//offset (row,column)
if(nextCell.getValue() === '')//checks for blank cell
nextCell.setValue(new Date());}
else if(r.getColumn() == 2, r.getValue()==='Closed') {
var nextCell = r.offset(0, 7);//offset (row,column)
if(nextCell.getValue() === '')//checks for blank cell
nextCell.setValue(new Date());}
else if(r.getColumn() == 2, r.getValue()==='Lost') {
var nextCell = r.offset(0, 8);//offset (row,column)
var closedCell = r.offset(0, 7);
if(nextCell.getValue() === '')//checks for blank cell
nextCell.setValue(new Date()), closedCell.clearContent();}
}
你是否对代码的问题你写的吗?如果是这样,你可以分享它吗?如果没有,请参阅[StackOverflow帮助/常见问题](http://stackoverflow.com/help/how-to-ask) –