So I've made the following code to search for an specific keyword on a row in a sheet:
function findNios() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = ss.getSheetByName('DataSheet');
var r = s.getRange(2,11,s.getLastRow() - 1,1);
var v = r.getValues();
var searchTerm = "nios";
const result = v.map(row => row[0].toString().toLowerCase().indexOf(searchTerm) > 1 ? ["Present"]: ["NO"])
r.offset(0,35).setValues(result)
}
However this is only for one keyword in specific as defined here:
var searchTerm = "nios";
And now I want to add several terms to the search, so for example I have the following substrings that I want to search and if one isn't found proceed to look to the other term:
var searchTerms = "nios", "blob": ,"centre";
Is there a way to make this work with multiple terms?
