I am trying to add a formula in Google app script but not getting the right syntax for it
I have
var formulatoinsert = "=" "IF(" "$" ae_range "==" bespoke "," bespoke "," "($" ae_range "*(1-" ae_range ")))";
I want
=IF($M43=="bespoke","bespoke",($M43*(1-R43)))
I tried the above code but not able to get it.
CodePudding user response:
Try this out for your case
var formulatoinsert = `=IF($${ae_range}==“${bespoke}”,”${bespoke}”,($${ae_range}*(1-${ae_range})))`;