title: Google spreadsheet delete row based on value 0
body: <p>I have looked at this discussion but didn't want to hijack it.  <a href="https://stackoverflow.com/questions/11058019/delete-a-row-in-google-spreadsheet-base-on-value-of-cell-in-row">link</a></p>
  
  <p>I'm a newbie to google scripts but i have found this one which work in some way</p>
  
  <pre><code>function deleteRows() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var s = ss.getSheetByName('ark1'); // 0AmWS-4fnAa_OdG9aV210NnZlZHlDYVRZSUxrOFdwX1E&amp;usp
    var values = s.getDataRange().getValues();
  
    var deleted = 0;  // Counter (don't need if we loop backwards)
    for (var row = 0; row &lt; values.length; row++) {
      if (values[row][2] == '' || values[row][2] == 0) {
        s.deleteRow(row + 1 - deleted);
        deleted++;
      }
    }
    SpreadsheetApp.flush();
  };
  </code></pre>
  
  <p>It works in my test spreadsheet. But only in the column C. When i enter the number 0 the row is deleted. I would like it to react to a different column. ie N instead.
  How do I do that?
  I bet the answer is pretty obvious, but I just can't figure it out.
  Any help is much appreciated.</p>
  
  <p>Thanks!</p>
  
  <p>Jesper Homann</p>