Answer the question
In order to leave comments, you need to log in
Executing a macro in a selected cell?
function f1(){
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Главная");
if(sheet.getRange(4, 5).isChecked()===true){
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('Билеты'), true);
spreadsheet.getRange('C3').activate();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('Главная'), true);
spreadsheet.getRange('\'Билеты\'!C3').copyTo(spreadsheet.getActiveCell(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
}}
Answer the question
In order to leave comments, you need to log in
You have it first
, and then
I can’t understand what is being done at all, but I think that you need to remember the active cell in advance
spreadsheet.getRange('C3').activate();
spreadsheet.getActiveCell()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question