Answer the question
In order to leave comments, you need to log in
Why does the script use all cells A1 in the table for its calculations?
In the table on all tabs, cell A1 began to pull up some values. It is simply converted to a number and cell changes are not saved. As if the import was pulled up.
The value constantly changes if you change other cells.
Could this be due to adding a script to the table (counting values based on color)? The script has a parameter for cell A1 - and, as I understand it, it is responsible for a certain buffer in the script. But why did it occupy all cells A1 in the table, and not just the desired tab? How to fix this, maybe the script is needed.
Answer the question
In order to leave comments, you need to log in
You probably need to check the sheet name before processing it
/**
*
* @param {GoogleAppsScript.Events.SheetsOnEdit} e
*/
function onEdit(e) {
const sheetName = 'Sheet6'; // Имя листа, который можно использовать
if (e && e.range) {
const sheet = e.range.getSheet();
if (sheet.getName() === sheetName)
sheet.getRange('A1').setValue(Math.random());
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question