title: Why isn't my Google Sheets Script running on a mobile
body: <p>The following script runs well on my Windows PC but on my phone, when I enter the date in Cell A1, it does nothing other than clear the cell. Is this a limitation of Google Sheets on a mobile or am I doing something wrong</p>
  <pre><code>function onEdit(e) {
  var ss = SpreadsheetApp.getActiveSpreadsheet()
  var sheet = ss.getActiveSheet();
  var changedCell = sheet.getActiveCell().getA1Notation();
  
  if(changedCell==&quot;A1&quot;) {
    var columns = sheet.getMaxColumns();
    var theDay = new Date(sheet.getRange(1,1).getValue()).setHours(0,0,0,0);
    
    sheet.getRange(&quot;A1&quot;).setValue(&quot;&quot;);
  
    sheet.setActiveSelection(&quot;B1&quot;).activate;
  
    for (var i=2;i&lt;columns; i++) {
      var workDate = new Date(sheet.getRange(3,i).getValue()).setHours(0,0,0,0);
      if (theDay === workDate) {
        sheet.getRange(4,i).activate();
        break;
      }
    }
  } 
  }
  </code></pre>