0
我是新來的這一點,但管理由一對夫婦的事情找網上招徠在谷歌表時間戳一會兒前。如何?:多頁時間戳
我真的試圖讓這個跨多張工作,但我在努力,請可以有人讓我知道我錯了。我試圖把它放在一個數組中,正如其他帖子中所建議的,而不是至少一張工作表,沒有任何工作。
在此先感謝您的幫助!
function onEdit(event) {
var sheetName = 'RAIL'; //Selecting the sheet - need to add 'CIVILS' & 'SYSTEMS' sheets but when put in array ['RAIL', 'CIVILS', 'SYSTEMS']; nothing returns
watchCol = [1, 2, 3, 4, 5, 6, 7, 8, 10, 11], //Watches Columns for edits
stampCol = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9], //Inserts the timestamp under "Last Updated" in sheet after edits
ind = watchCol.indexOf(event.range.columnStart);
if (event.source.getActiveSheet()
.getName() !== sheetName || ind == -1 || event.range.rowStart < 2) return;
event.source.getActiveSheet()
.getRange(event.range.rowStart, stampCol[ind])
.setValue(event.value ? new Date() : null);
}