Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

415
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda