I want to remove all jobs mentioning "takehome", "take home", "take-home", etc. from this sheet: https://docs.google.com/spreadsheets/d/1UgiKHokV3bpeuCF4lhgc9aQisE3c86OyVjZeats9u24/edit#gid=0
This code does not do anything:
function myFunction() {
var sheet = SpreadsheetApp.openById("1UgiKHokV3bpeuCF4lhgc9aQisE3c86OyVjZeats9u24");
var data = sheet.getDataRange().getValues();
for (var i = data.length - 1; i>=0; i--) {
if (data[i][0].includes('takehome')) {
sheet.deleteRow(i);
}
}
}
How can I do this, thanks!