I have a simple column in column A in a sheet by name Sno. (serial number). I am trying to read the column and identify -
-if there are any empty cells from first cell in the column to the last filled row and
-if the values which are present are numbers only
This will help me do 2 validations, to identify empty cells in between the cell values, like if there are 1 - 200 numbers entered then in between there are no misses in the series and if the values which are present all numbers
I tried the below to check that but not getting it right-
unction siteShieldmaps() {
SS = SpreadsheetApp.getActiveSpreadsheet();
var SS_m = SS.getSheetByName("Cleanup sheet");
var LAST_ROW = SS_m.getLastRow();
console.log(LAST_ROW);
var Sno_values = SS_m.getRange(`A1:A${LAST_ROW}`).getDisplayValues().toString();
console.log(typeof Sno_values);
var result = isNumberOrEmpty(Sno_values);
console.log(result);
}
function isNumberOrEmpty(array) {
var result = [];
for (var i = 0; i < array.length; i++) {
if (array[i] === "") {
result.push("empty");
} else if (!isNaN(array[i])) {
result.push("number");
} else {
result.push("not a number");
}
}
return result;
}
Please guide



Sno_valuesis a 2D array of 1 column. So all your refereces toarrayshould bearray[i][0].