I want to make loop in google sheets scripts that will in a first place get position of every row where on column B is "N/A" error and then delete the whole row. I start with that code but it doesn't return me the row of "N/A" string.
function DeleteShops() {
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("MainShops");
for(i=4; i < 282; i++){
var RowCheck = ss.getRange(i, 2).getValues();
if (RowCheck === "#N/A") {
var RowToDelete = ss.getRange(i, 2).getRow();
break;
}
else {
continue;
}
}
Logger.log(RowToDelete);
}