Answer the question
In order to leave comments, you need to log in
How to turn a formula into a macro?
Good day!
Such a problem, you need to turn the formula into an autorun macro with the following condition:
If( a1=1;u(a2=sheet2!A4;a5=sheet2!a5); if(a1=2;u(a2=sheet2!v6;A4= sheet2!v6);""))
In other words: when changing the value of one cell, the contents of others, which are taken from other sheets, should change.
The formula is inconvenient, because there are 30 such values, and there are 4 changing cells. It is also inconvenient to make 30 macros for each value.
Thank you!
Answer the question
In order to leave comments, you need to log in
For this, it is convenient to use the onEdit(event) function.
Inside, we keep track of which cell has changed, and change what is needed.
function onEdit(event){
//event.source.getActiveSheet().getName() для определения имени листа
//event.source.getActiveSheet().getActiveRange().getA1Notation() для определения имени ячейки
};
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question