title: How to delete row in Google Sheet if "Column A" cell CONTAINS given text
body: <p>I am trying to implement a Google Script so that if any cell in column A INCLUDES any specified text, then it will delete the entire row. Here is what i'm working with...</p>
  
  <pre><code>function onEdit() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var s = ss.getSheetByName('Sheet1'); // change to your own
    var values = s.getDataRange().getValues();
  
    for (var row in values)
      if (values[row][0] == 'glass')
        s.deleteRow(parseInt(row)+1);
  
      else if (values[row][0] == 'Glass')
        s.deleteRow(parseInt(row)+1);
  
  };
  </code></pre>
  
  <p>I am going to include multiple different criteria to clean my spreadsheet for me. Some of the rows might include "auto glass", "autoglass", "Glass repair", "Glass Doctor", "Glass Smith" Etc...</p>
  
  <p>Currently, this code deletes the rows where the column A cell is "Glass" or "glass".</p>
  
  <p>PLEASE HELP!!</p>