Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

417
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda