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

414
Views
SyntaxError: missing ) after argument list - in Sheets Script

I've encountered some problems using Regex (extract / match) in Google Sheets Script, but managed to handle artificially by referencing cell that contains my Regex (it actually works better in this way to me, cuz I can quickly modify regex from cell).

function fillL() 
{
var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  ss.getRange("L4").setFormula("=REGEXMATCH(B4,$L$3)");

  var lr = ss.getLastRow();
  var fillDownRange = ss.getRange(4,12,lr-3);
  ss.getRange("L4").copyTo(fillDownRange);
}

But this same trick doesn't work for a more complex formula as the one below. I've read I need to concat strings/variables with + , and tried doing it but I still get the 'Syntax error: SyntaxError: missing ) after argument list line: 98 file: Code.gs'

function fillN() 
{
  var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  ss.getRange("N4").setFormula("=IF((ISNUMBER(MATCH(REGEXEXTRACT(A4,$N$3),Sheet8!$A$1:$A,0))=TRUE),INDEX(Sheet8!$B$1:$B,MATCH(REGEXEXTRACT(A4,$N$3),Sheet8!A:A,0)),"No Match")");

  var lr = ss.getLastRow();
  var fillDownRange = ss.getRange(4,14,lr-3);
  ss.getRange("N4").copyTo(fillDownRange);
}

I tried to concat the only string in the formula there at the end ( + "No Match"), but I still get the error, can't figure out if smth else is wrong?! This is the regex referenced in the cell that I'm using, if it helps. Thanks

enter image description here

about 4 years ago · Juan Pablo Isaza
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!