Trying to figure out how copy and paste a formula using Google Script in google sheets. When I use the getFormula and setFormula it does copy the formula but it keeps the same range, it does not dynamically update the range like it normally does when you use the spreadsheet without a script. Wondering what I am doing wrong... here is my code
var source = formulaSheet.getRange(row+1,col-1).getFormula();
var target = formulaSheet.getRange(row+1,col);
target.setFormula(source);