Answer the question
In order to leave comments, you need to log in
How to set up data transfer from one table to another if the value in the cell has changed?
There is a Google table that displays at what stage of production the product is. Is it possible to transfer data from one sheet to another in certain cells if a specific stage is reached? In this case, the information should be deleted from the first sheet.
Answer the question
In order to leave comments, you need to log in
Add an onEdit (e) function that will check if the data has changed and how. And if everything matches, then send the data to another table, and delete the original ones. At the same time, a simple trigger for access will no longer be enough and you need to make a full-fledged trigger for editing.
Here is the code snippet:
function onEdit(event) {
const whiteList = ["Лист1", "Лист2"];
let ss = event.source.getActiveSheet(); //Текущий лист
let address = event.range.getA1Notation().toUpperCase();//Адрес ячейки
let row = event.range.getRow(); //Номер строки
let col = event.range.getColumn(); //Номер столбца
let newValue = event.value; //Новое значение
let oldValue = event.oldValue; //Старое значение
if (whiteList.indexOf(ss.getName())==-1) return; //Указываем на каких листах должен работать скрипт
//Что-то делаем...
};
only with a script, share the table I will help [email protected]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question