Answer the question
In order to leave comments, you need to log in
How to limit the number of rows in a range to search for a word in a Google spreadsheet column?
How to limit the number of rows in a range to search for a word in a Google spreadsheet column?
Looking for a word in a table column using code like this
function check(sheetName, column, word) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName(sheetName);
var range = sheet.getRange(column);
var values = range.getValues();
var result = false;
for (var i = 0; i < values.length; i++) {
if (values[i][0] == word) {
result = i+1;
break;
}
}
return result;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question