Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
Google Sheet AppScrip setFormula Syntax error: SyntaxError: missing )

i cant get what im missing with my script (newbie, non-coder, I only get the script in google) here is my script.

GOOGLE SHEET appscript

var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("INVENTORY OUT");
ss.getRange("B2").setFormula("=IFERROR(VLOOKUP(I:I,'get sloc for picklist'!A:B,2,0),"NO STOCKS")");

error message:

Syntax error: SyntaxError: missing ) after argument list line: 52 file: ADD_1.gs

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Solution:

The solution would be to use template literals:

function myFunction() {
  var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet15"); 
  ss.getRange("B2").setFormula(`=IFERROR(VLOOKUP(I:I,'get sloc for picklist'!A:B,2,0),"NO STOCKS")`);
}

In this way everything that is enclosed by the backticks (``) is considered as a type of string.

about 4 years ago · Juan Pablo Isaza Report

0

You cannot use single quotes in your formula definition that is already enclosed in quotes!

ss.getRange("B2").setFormula("=IFERROR(VLOOKUP(I:I,'get sloc for picklist'!A:B,2,0),\"NO STOCKS\")");
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!