title: Google Sheets : Show Browser msgBox when cell content changes to 'Yes'
body: <p>I have a very simple function that needs to display a message when the content of a cell changes from "No" to "Yes". The code I have written works well except that the message shows regardless of data entered. The message should show only if the cell content is "Yes"</p>
  
  <p>Here is my code:</p>
  
  <pre><code>function onEdit(e){
    var sheet = SpreadsheetApp.getActiveSheet();
    var mftCell = sheet.getRange("E25:E26");
    if (mftCell="Yes");
    Browser.msgBox('Enter the % in the next cell!');
  }
  </code></pre>
  
  <p>Thanks</p>