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

156
Vistas
Google Sheets - When clicking on a checkbox, I want the row to be cleared (not deleted), and also for the checkbox to then reset

I've been trying to figure this one out and I'm a bit lost...

This is what I have so far:

function deleteCheckedBoxes() {

const sheet = SpreadsheetApp.getActiveSheet();

const activeRange = sheet.getActiveRange();
const activeRow = activeRange.getRow();
const activeColumn = activeRange.getColumn();

let rangeUpdatedValue =  activeRange.getValue();

if(activeColumn == 5 && rangeUpdatedValue == true){

 sheet.deleteRow(activeRow);

};
  
}

How can I get it to clear the row instead of deleting it?

I have tried clearContent & ClearContents, but it doesn't seem to work

Any help would be greatly appreciated!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

When your showing script is modified, how about the following modification?

From:

sheet.deleteRow(activeRow);

To:

sheet.getRange(activeRow, 1, 1, sheet.getLastColumn()).clearContent();
  • When this modified script is run, the row of the active range is cleared.
  • In this case, by clearContent(), the checkbox is unchecked.

Reference:

  • clearContent()
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