現状、シートAのA列に「1」を入力したら「A5」に飛ぶようになっているのですが、
これを他のスプシ・シートBの「A5」に飛ぶようにするにはどうしたら良いでしょうか。
function moveOperatingRow() { const col = 1;//A列 const distRow = 5;//5行目に挿入 const name = 'シートA'; const inOperation = '1'; const sheet = SpreadsheetApp.getActiveSheet(); const cell = sheet.getActiveCell(); if (sheet.getName() == name) { if (cell.getColumn() == col) { if (cell.getValue() == inOperation) { sheet.moveRows(cell, distRow); } } } }
どなたかご教示いただけないでしょうか。
よろしくお願いいたします。
0 コメント