title: Comparing strings in google scripts
body: <p>Trying to make a very basic function in google scripts. Basically, I want to read a value from cell J5 and increment the value in L5 until J5 says "Good!" (which would happen based on other stuff in my spreadsheet). I can't seem to test the string though.. when running, the code just seems to stop randomly or run forever (I also need the code to not touch the spreadsheet the moment it says "Good!", otherwise.. everything gets altered since the formulas run again).</p>
  
  <pre><code>  function makeSelections() {
        var ss = SpreadsheetApp.getActiveSpreadsheet();
        var testcell = ss.getRange('J5')
        var testcellValue = testcell.getValue();
        for (var i = 0; testcellValue != "Good!"; i++) {
          ss.getRange('L5').setValue(i); 
          testcellValue = testcell.getValue();
        }
      }
  </code></pre>
  
  <p>EDIT: As zbnrg pointed out, it appears to be a problem with the spreadsheet being way too slow to keep up with the script. Can anyone help with code to check a range (A2-A14) for no duplications (i.e. all unique entries)?</p>