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

143
Visualizações
Google sheet script

Can someone help me convert a script layout to actual functional code? I have general coding knowledge, but I don't know the correct syntax.

Basically what I need is a script that loops through all the sheets/tabs when a form entry is submitted. The form contains name of the person who submitted the form (string), a start date, an end date, and finally a comment field (string).

I need the script to loop through row 5 of each sheet, and look for the string entered in the first form field (name of the one who submitted the form). If it finds the name it should save the column that corresponds with that name to a variable for later use.

Then it should loop through column A (A:6-A462) to find the start and end date fields, and save both corresponding cells to variables. A new loop should loop through the cells from the start date to the end date, checking if the background color of the cells is white. If it's white it should mark them in green.

Here's a general layout of how the function can be coded;

Here's a general layout of how the function can be coded;

https://prnt.sc/1uqf66r

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This is part of the solution , the methods listed are the ones you mainly need. Do have a read of the GAS documentation before posting such questions.

    function obtainsheetid(){
  pol = SpreadsheetApp.getActiveSpreadsheet().getSheets()[1].getRange("T1").setValue("hi")
  console.log(pol)
  const sheetArray = SpreadsheetApp.getActiveSpreadsheet().getSheets()
  for(let i = 0 ; i < sheetArray.length;i++ ){
    intValue = sheetArray[i].getRange("A5:Z5").getValues()
    if(intValue.test(new RegExp('entered name'))){
      sheetArray[i].getRange("A5:Z5").clearContent().setValue("entered name")
    }
  }
}

visit https://developers.google.com/apps-script/reference/spreadsheet/sheet for more info regarding the coding methods for GAS.

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