I've developed a Google Apps Script that scans specific columns for certain keywords and deletes rows that contain them:
function filterRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var values = rows.getValues();
var rowsDeleted = 0;
var searchWords = ['furniture takeover','can be taken over','caravan','trailer']
for (var i = values.length - 1; i >= 0; i--) {
var row = values[i];
for (var j = 0; j < searchWords.length; j++) {
if (row['21','17'].indexOf(searchWords[j]) > -1) {
sheet.deleteRow(i+1);
rowsDeleted++;
break;
}
}
}
};
Is there a way to make the keyword check not case-sensitive? For example, if I include "apartment rental", it should remove all matches of: APARTMENT RENTAL, apartment rental, Apartment Rental?