I don't find a good solution to automatically increment a concatenate formula starting at row 2 and finishing at row 50.
I already managed to set the concatenate formula in the second row and 10th column with this.
var formula2 = 'CONCATENATE(C1;" - ";D1)'
sheet.getRange(2,10).setFormula(formula2)
How should I do now to increment it automatically from 2 to 50 in the E column ?
How about the following modification?
sheet.getRange(2,10).setFormula(formula2)
sheet.getRange("E2:E50").setFormula(formula2);
CONCATENATE(C2;" - ";D2)
to the cell "E2", please modify var formula2 = 'CONCATENATE(C1;" - ";D1)'
to var formula2 = 'CONCATENATE(C2;" - ";D2)'
.