在复选框中插入单元格中的日期为true
我正在遇到这项工作的问题。我想在Colum 1中进行复选框时,在Colum 4中插入今天的日期。有多行。我没有看到自己的方式错误。任何建议将不胜感激。
谢谢,
function onEdit(e) {
var ss = e.source.getActiveSheet();
var date = new Date();
if (e.range.columnStart != 1 || e.value != "TRUE") return;
ss.getRange(e.range.rowStart,4).setValue(date);
}
I am having issues making this work. I want to insert todays date in colum 4 upon making checkbox true in colum 1. There are multiple rows. I am not seeing the error of my ways. Any suggestions would be appreciated.
Thanks,
function onEdit(e) {
var ss = e.source.getActiveSheet();
var date = new Date();
if (e.range.columnStart != 1 || e.value != "TRUE") return;
ss.getRange(e.range.rowStart,4).setValue(date);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
而不是
简单地使用:
然后,而不是:
您可以简单地使用:
这也可以消除对SS变量的需求。
Instead of:
Simply use:
And then instead of:
You can simply use:
That allows you to eliminate the need for the ss variable as well.