Let's say A1= X+Y
Now I'd like to add +Z
with a script so I end up with A1= x+y+z
. I know how to copy it, or overwrite it, but not sure exactly how I would add to it with a changing formula in A1
.
Some combination of getrange
and copyto
but also adding something to the end?
var ss = SpreadsheetApp.openById("ID"); var first = ss.getSheetByName("Name"); var gg = first.getRange('A1'); first.activate(); gg.setFormula(first.getRange('A1').getFormula() + "+Z");
– learner1234 Apr 26 '19 at 11:55