I'm using Google Apps Script to copy formulas from one row to another; however when I call setFormulasR1C1()
on the new row with oldRow.getFormulasR1C1()
passed as argument, the formulas do get copied as expected but I get a Formula parse error
back on the sheet.
Here's the relevant code snippet:
var referenceRowFormulasR1C1 = referenceRow.getFormulasR1C1();
var currentRow = sh.getRange("A"+rowNum+":"+rowNum);
currentRow.setFormulasR1C1(referenceRowFormulasR1C1);
Back in the sheets, I get the following error:
Formulae of row 82
were copied from row 81
. The formula for B81
looks like this, and works fine (so does the formula for B83
):
=VLOOKUP(F81,'Transport & Guide Languages & Training'!$A$2:$I$100,5,FALSE)