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

111
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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