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

156
Visualizações
How Can I use a custom function's range without Quotation?

I Want To Use =GETLASTROW(A1:A10)

instead of =GETLASTROW("A1:A10")

i want to get the last row number of a specific range that have values on it ...

Here Is My Custom Function Can You Update This ? 👇👇👇

/**
 * Get the last row counts with the blank cells included for a specific range selected.
 *
 * @param {A1:A10} range -->Enter the column number to count on.
 * 
 * @customfunction
 */



function GETLASTROW(range) {
  var ss = SpreadsheetApp.getActive().getActiveSheet();

  var rg = ss.getRange(range).getValues();
  var lrindex;

  for(var i = rg.length-1;i>=0;i--){
    lrindex = i;

    if(!rg[i].every(function(c){ return c == ""; })){
      break;
    }
  }
  return lrindex + 1;
}

if you made this then please reply me my updating my code ...

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Welcome to SO, You can't use it like this GETLASTROW(A1:A10) here A1:A10 Is not a type that JS knows of you need to use one the JavaScript types such as String, Array, Object, I think objects is the closest thing for your example you can call the function like this GETLASTROW({A1:"A10"}).

Then you can use it like this

GETLASTROW({A1:"A10"})

function GETLASTROW(rangeObject){
   var range = rangeObject["A1"] // the value of this will be A10
}
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