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

158
Vistas
How to show an advice message if a cell is blank in google sheets?

i hope you can help me. I have this code, and i want to display an alert if the cell is blank, and also, if it is dont paste the information on my DB.


function Guardar() {
    var hojaActiva = SpreadsheetApp.getActiveSpreadsheet();
    var registro = hojaActiva.getSheetByName("Macro de Solicitud");
    var bd = hojaActiva.getSheetByName("Respuestas Macro de Solicitud");
    var valores = [
        [
            registro.getRange("c16").getValue(),
            registro.getRange("j13").getValue(),
            registro.getRange("f14").getValue(),
            registro.getRange("c4").getValue(),
            registro.getRange("c6").getValue(),
            registro.getRange("c8").getValue(),
            registro.getRange("c10").getValue(),
            registro.getRange("c12").getValue(),
            registro.getRange("c14").getValue(),
            registro.getRange("f4").getValue(),
            registro.getRange("f6").getValue(),
            registro.getRange("f8").getValue(),
            registro.getRange("f10").getValue(),
            registro.getRange("f12").getValue(),
            registro.getRange("f16").getValue()
        ]
    ];
    bd.getRange(bd.getLastRow() + 1, 1, 1, 15).setValues(valores);
}
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

In your sheet names 'Macro de Solicitud' add a formula in a cell that count the number of values in C16,J13,F14,etc. and compare with the number of cells. By checking the result you will find if one at least cell is blank before pasting the informations in your data base..

about 4 years ago · Juan Pablo Isaza Denunciar

0

Alert if range is blank

function lfunko() {
  const ss = SpreadsheetApp.getActive();
  const sh = ss.getSheetByName("Sheet0");
  const ui = SpreadsheetApp.getUi();
  const rgl = sh.getRangeList(["c16","j13","f14","c4","c6","c8","c10","c12","c14","f4","f6","f8","f10","f12"]);
  rgl.getRanges().forEach(r => {if(r.isBlank()){ui.alert(`${r.getA1Notation()} is blank`)}});
}
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