I am trying to create a Google Sheet Script that sets a formula and autofills the formula for each new row added and getting the error: SyntaxError: missing ) after argument list (line 3, file "Code.gs")
Here is the script:
function myFunction() {
var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
ss.getRange("AE2").setFormula("=LEFT(F2,FIND("for $",F2)-1)");
}
I can't figure out where the missing ) is? The formula works without any problems in the sheet itself
Honestly I am not experienced in writing scripts so any help will be appreciated
"=LEFT(F2,FIND("and than it errors outss.getRange("AE2").setFormula('=LEFT(F2,FIND("for $",F2)-1)');