title: How can I get a macro to automatically trigger when a cell reaches a certain value in a Google Sheet?
body: <p>What I need is for a macro I've recorded called SwitchHotSeat to trigger when the value of cell F3 goes above £1,000,000.00 0r 1000000 or the LEN of cell F3 goes over that length. </p>
  
  <p>I can find guides for doing this in Excel, but not for Google Sheets. below is just the code for my macro.</p>
  
  <pre><code>function SwitchHotSeat() {
    var spreadsheet = SpreadsheetApp.getActive();
        spreadsheet.getRange('3:3').activate();
  
   spreadsheet.getActiveSheet().deleteRows(spreadsheet.getActiveRange().getRow(), spreadsheet.getActiveRange().getNumRows());
    spreadsheet.getActiveRangeList().setBackground('#ff0000')
    .setFontColor('#ffffff');
  };
  </code></pre>
  
  <p>The macro works fine. I just need a way of triggering it when that cell goes over the 1000000.</p>