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

162
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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