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

108
Visualizações
Hiding rows with blank cell in column E

I am very new to using scripts in Google Sheets, but found this simple and useful piece of code online. I am trying to hide rows in a specific range (rows 10 - 34) where the cells in column E are blank. The code below seems to hide all rows in the range regardless, even those that have a number in column E.

I have tried:

data[i][3] = 'null', 
data[i][4] = 'null', 
data[i][5] = 'null'

Any idea where I'm going wrong?

Thanks so much for any help.

function filterRows() {
    var sheet = SpreadsheetApp.getActive().getSheetByName("Print Client Report");
    var data = sheet.getDataRange().getValues();
    for(var i = 9; i < 34; i++) {
      //If column E (5th column) is "Y" then hide the row.
      if(data[i][3] = 'null') {
        sheet.hideRows(i + 1);
      }
    }
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Hiding rows where column E is null in rows 10 through 34

function filterRows() {
  var sheet = SpreadsheetApp.getActive().getSheetByName("Print Client Report");
  var data = sheet.getRange(10, 1, 25, sheet.getLastColumn()).getValues();
  data.forEach((r, i) => {
    if (!r[4]) {
      sheet.hideRows(i + 10);
    }
  });
}
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