我有在互联网上收集的 Google Sheets 脚本,并在这里获得了一些帮助。不,我有两个onEdit冲突。我通过为onEdit2. 它有效,但我不认为这是最好的解决方案。您能帮忙将这两个函数onEdit用 if 函数合二为一吗?
//Dependent Dropdown list
function onEdit(e){ // Function that runs when we edit a value in the table.
masterSelector(master1,master2,master3,master4);
var activeCell = e.range; // It returns the coordinate of the cell that we just edited.
var val = activeCell.getValue(); // Returns the value entered in the column we just edited.
var r = activeCell.getRow(); // returns the row number of the cell we edit.
var c = activeCell.getColumn(); …Run Code Online (Sandbox Code Playgroud)