Answer the question
In order to leave comments, you need to log in
Cell monitoring. How to make a script to monitor changes in a cell?
Good!
There is a need to create a script:
- assign a formula to cell A (group of cells, column) that will calculate the difference between the value just entered and the previous one in another cell B.
- force cell A to monitor the state of cell B with a certain time interval.
Answer the question
In order to leave comments, you need to log in
App Script + time trigger, won't it hurt? Or I didn’t understand the task, or this is not a difficult question, but incorrectly formulated, you better visually guess what you need.
Look aside onEdit ( event ) - cell change event. Here is the code snippet:
function onEdit(event) {
//Возникает при изменении ячейки
var ss = event.source.getActiveSheet();//Текущий лист
var address = event.range.getA1Notation().toUpperCase();//Адрес ячейки
var row = event.range.getRow(); //Номер строки
var col = event.range.getColumn(); //Номер столбца
var newValue = event.value; //Новое значение
var oldValue = event.oldValue; //Старое значение
if (["Лист1","Лист2"].indexOf(ss.getName())==-1) return; //Указываем на каких листах должен работать скрипт
//Что-то делаем...
};
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question