Quiero usar =GETLASTROW(A1:A10)
en lugar de =GETLASTROW("A1:A10")
Quiero obtener el último número de fila de un rango específico que tiene valores en él...
Aquí está mi función personalizada ¿Pueden actualizar esto? 👇👇👇
/** * 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; }si hiciste esto, por favor respondeme actualizando mi código...
Bienvenido a SO, no puede usarlo así GETLASTROW(A1:A10) aquí A1:A10 no es un tipo que JS sepa que necesita usar uno de los tipos de JavaScript como String, Array, Object , creo que los objetos son lo más parecido a su ejemplo puede llamar a la función como esta GETLASTROW({A1:"A10"}) .
Entonces puedes usarlo así.
GETLASTROW({A1:"A10"}) function GETLASTROW(rangeObject){ var range = rangeObject["A1"] // the value of this will be A10 }