unfortunately, my knowledge of Google app script programming is very weak and I need help as follows:
My function to find the right row in sheet2 with the search criteria from sheet works fine and now I need help to substitute exact these founded cells in the row.
First of all the function I use
function searchAndReplace(text, sheetName) {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet2 = ss.getSheetByName("Tabellenblatt3"); //data range in this sheet
const sheet = ss.getSheetByName("Tabellenblatt1"); // search criteria in this sheet
const text2 = sheet.getRange("I14:R14").getValues(); //range of new values
const textFinder = sheet2.createTextFinder(text);
const cell = textFinder.findNext();
const row = cell.getRow();
sheet2
.getRange(`A${row}:${row}`)
.activate();
}
function runsies2(){
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getSheetByName("Tabellenblatt1");
const text = sheet.getRange("M9").getValue(); //search criteria in M9
const sheetName = "Tabellenblatt3";
searchAndReplace(text, sheetName)
}
what do I have to do, to change the cell values of the activated row in sheet2 with the cell values of text2 (Range I14:R14) from sheet
I tried something with .replaceAllWith(text2) but everything went into a fault